Normally I use or abandon a companion based on their abilities, when they join, and their personalities. And, of course, the set-ups vary by class, but these are the characters most likely to earn a slot in my party.
DAO:
Most Used: Alistair, Morrigan, and Leliana.
All three join at or close to the beginning, which is very valuable since it lets me shape them however I want. They're also all love interests/best friend candidates, so my Warden has a good reason to bring them along. Two of them are plot-important, and they have wonderfully snarky banters together.
Least Used: Dog and Oghren
I love the Dog. I really do. But he just doesn't deal enough nor take enough damage to be worthwhile. And I usually do Orzhamar last, so by the time I pick up Oghren, one of two things has happened--a, my Warrior Warden is better than him, or b, Sten is better than him.
DAA:
Most Used: Nathaniel, Sigrun and Anders
Anders is a great heal-bot, even if he acts too much like Alistair for my taste. Sigrun is the most loveable bundle of energy ever and puts such a twist on the typical Death Seeker trope, that I have to bring her despite her lackluster DPS. Nathaniel is blessed with both an amusing personality and an amazing class (seriously, DAA was the time to be an archer).
Least Used: Velanna and Justice
Like Orzhamar, I usually do the Blackmarsh last so Sigrun and Velanna can Join. That means I have Justice for all of two quests before the end of the game, which just isn't enough time. And Velanna's personality grates me the wrong way--it's like they tried to replicate Morrigan, but failed.
DA2:
Most Used: Varric, Anders, and Fenris
Varric comes because he's Varric--enough said. Anders may be grating with his whining, but he does have a variety of casting styles--besides his healing, I've found him to do surprisingly good DPS. Fenris is a sword-wielding monster in elven form, and I like his banters with Varric (not so much with Anders, though).
Least Used: Sebastian, Bethany/Carver, and Aveline
Sebastian's interesting, but his DPS pales next to Varric's. Your sibling is gone most of the game, though I do use them when they're around. Aveline isn't that fantastic a tank, in my opinion. Warrior!Hawke is better in every regard, Duelist!Hawke is a great dodge-tank, and Spirit Healer!Hawke has buffs and one-hundred percent health regeneration. Even if Hawke isn't specced for tanking, I find that Fenris can off-tank well enough. And, as the above poster said, I think the guard-captain would spend more time defending Kirkwall than wandering with Hawke.
For DAI, I'm not certain. Blackwall doesn't look very interesting to me; neither does Solas. Sadly Cassandra isn't standing out much, either. However, I like what I've seen of Iron Bull and Sera, so they're probably going to see a lot of party time. I'd love to bring Varric or Cole along, but that's probably only going to happen on my non-rogue runs. Between Viv and Dorian, I find Dorian more intriguing.
Predicted order of companion use is something like this:
IB = Sera > Varric > Dorian > Cole > Cassandra = Vivienne > Solas = Blackwall