I'll do companion NPC characters because I understand them the best: They need understandable motivations (or hidden, but understandable motivations), unpredictability, some element of mystery, effective in the game, and a good voice actor.
(Note that I have generated this list in five minutes, so it's possibly I have forgotten something. Anyway.)
Motivations: People like characters they can understand or sympathize with. Part of my love of Hellboy and Robot Man in Grant Morrison's Doom Patrol is that when they are confronted with a weird situation, they go "hunh?" and then they punch it repeatedly. This is an understandable, sympathetic motivation.
Unpredictable: Cliches being what they are, familiarity breeds contempt. If you come across a character archetype you immediately recognize and know exactly what his personality and character arc is going to be, he immediately becomes less compelling.
Mystery: Characters become more interesting when there is an element of mystery about their personality or motivations - then they become a mini-game that you want to unlock and find out why they are doing the things they do. The more these mysterious agendas revolve or focus around your player character, the better.
Effective in the Game: Any character that does not perform an effective support role in the game is pretty much doomed by any non-roleplayer, which you should assume is everyone. Myron from Fallout 2 - ineffective. Cassidy and Bonenose from Fallout 2 - effective. I sometimes call this the "Final Fantasy III Test" - every character in Final Fantasy III had a different, yet very effective combat ability, which made them all worthwhile to use in the game.
Voice Actor: Poor voice acting can breed hatred faster than anything, especially if their combat lines or selection lines are annoying or shrill.
One last thing - any NPC who disparages your character or doesn't acknowledge that the main player is super cool on some level, even if it's grudgingly, is generally not as well liked as other companion characters.
Sorry for the delay on this, we were in Dallas showing Neverwinter Nights 2 at A-Kon. Expect pix soon. If you want to see informal pix, go to:
Informal A-Kon pix.
This needs to be inscribed on gold plates and burried.
30 years later- The Church of Obsidan!