So at the lower end of the scale, we have "extras". These are characters who don't interact with the player in any meaningful way, for example, simply giving one line responses when the player clicks on them. These people don't really need any individual characterisation, as all that is needed here is a basic archetype: soldier, beggar, drunk, servant, etc. We don't need to know anything about the character themselves, just the group that they belong to, and some of the events or circumstances that individuals from that particular group might comment on. Here we're less concerned with characterisation and more concerned with the reality of the game world. These characters simply provide "flavour content" for those who want to take the time to talk or listen to them. Take Mass Effect 1's "refund guy" as a memorable example of this kind of character. (Can you believe I could not find a screenshot of him? And I don't have the PC version, so I can't take one him either!)
Nameless citizens: the unimportant cast of their own reality
Taking a step up from extras, we have minor characters. These ultimately play very little role in the story, but in an RPG, this character may provide a brief introduction to a situation or offer the player a small sidequest. From this level of character upward, my basic litmus test for a character is fairly simple, and involves looking at the character's desires or primary goal. Ask yourself two questions: What does this character want? Why do they want it?
If you can't answer those two questions, then your character is probably in need of more design. Now, obviously for more complex or prominent characters, you're going to need more details, like behaviour, upbringing, personal morals, and much more. But for a basic character to act coherently within a game, you need to know the answer those two questions. If you can't then they probably can't interact with the character in any meaningful way. If you can, then that's potentially all you need for a simple quest-giver NPC. Do you really need a full backstory for the mother who wants you to look for their child? Or for the bartender who wants you to get rid of the thugs from his bar? These characters have simple desires and simple goals, and there's really no need to develop them further than their role in the game requires.
Please kill the monster, I'm too scared to do it.
On the other hand, we have major NPCs. Characters crucial to the plot, antagonists and party members. These characters should have some really solid development behind them, including history/backstory, personality traits, speech patterns, like and dislikes... basically a full biography and profile. If these characters are meant to grow, develop and shine as three dimensional characters, they have to have conflicting elements to their personality, individual components that come together to form a cohesive individual who has the potential to mature throughout the game's narrative.
Now, this isn't to say that characters have to change their personality during a game, even though I love that as a concept. But a character should grow and develop into a fully formed creation as the adventure progresses. The player should gradually learn more about important characters as the game progresses, as new information and experiences present their character in a new light or expose different facets of their personality or background. This applies equally to all major characters, be they allies, companions or adversaries. Companions don't immediately divulge all their secrets to you upon meeting them, and there is no mystery in the enemy whom you fully understand from a single encounter.
Where's the fun in Sten telling you everything at once?
Of course, there will be plenty of characters that fall in-between the extreme of "major character" and "side quest NPC". At what point do we cross the line and require more details for those characters? How far do you go developing a backstory for someone who is a catalyst for some events but will ultimately fall by the wayside? This is when I go back to my litmus test. For each significant action that a character is taking, you need to know why they are making that action. The small time villain serving the player's ultimate enemy needs to have a reason to support his master, but they may also need their own motivation to want to kill the player character. Now, this could be as simple as wanting to please their master and assume a higher rank in the Nebulous Evil Organisation, or it could be something a lot more complex.
Deciding what makes characters the way they are is part of the fun of writing. For the player, finding out about those characters helps to make the journey fun. It can be a lot more fun to defeat a game's villain if you're doing it with people who feel like they are your friends. If players have insight into the personality of the characters they are dealing with (whether on friendly or unfriendly terms), it makes for a much more enjoyable narrative, which consequently should deliver a better game.