Let's start with the most basic tip: Transfer anything you pick up to your companion so you can pick up more stuff. Especially heavy stuff!
Give your companions melee weapons for better face-to-face combat.
Use your companion to attack weaker enemies so you don't have to — you'll save precious ammo and the risk of getting hurt is much less. (But you won't get any XP.)
next slide will load in 15 secondsSkip AdSkip AdUse your companion as a scout/decoy/human shield.
Command your decoy by clicking/selecting them and pointing to where you want them to go. "Strong, go forth into that explosion to make sure the enemies are dead!"
Command your companion to enter your power armor! You can take it with you everywhere you go, and they won't use up any Fusion Cores while in it.
WARNING: Your suit may get damaged while your companion is wearing it, and you can't put it back on until it's repaired.
Assign heavily armed/powerful companions to your settlements that aren't as heavily defended. They'll do a good job of defending it.
Even if you use the Lone Wanderer perk (15% less damage and 50 more carrying capacity), you can still bring Dogmeat with you.
Don't bother giving valuable Stimpaks to companions unless you need to get them back up in the middle of a fight. They'll never die and will get back up after the fight is over.
next slide will load in 15 secondsSkip AdSkip AdWhen you obtain one companion's perk, it'll stay activated even if they're not with you.
When you achieve Garvey's maximum Affinity, you'll permanently get his perks, even if you don't use him as a companion later.
And of course, dress your companions to impress.
Yep, Codsworth is wearing a bowler hat. As he should be!
BONUS: Here's a gratuitous hilarious "Fallout 4" GIF. Just for you.