Add whatever you want your buddy to use to their inventory panel, just like trading with a merchant, then highlight it and press Equip (Triangle/Y).
If you're close enough the menu will change, with one option for Trade (Square/X). If you're yet to figure it out: face your active companion and press the activate button (Cross/A). Note that you'll need to give them ammo for anything but their default weapon, so this isn't an unlimited missiles exploit. Dress them up in armour to keep them alive longer in battles and hand over more powerful boomsticks for tough fights.
It's really easy to miss the button prompt for this, but the trade menu isn't just for offloading excess inventory weight on your buddy. Equip NPCs with new gear - including Power Armor Behold, VG247's list of things you didn't know about Fallout 4. And yet you still haven't completely dominated the Commonwealth and brought it under your mighty dominion! We've just generally assumed everyone can read menu prompts. The ultimate list of things you didn't know you could do in Fallout 4