Think about it.
We're all flawed, which is why it just makes it all the more important. It's realistic to be flawed - because whether we want to be or not, we always will be.
Flawed characters are realistic. We're not evil - but there is two forces fighting against each other. Light and darkness. And if we don't do anything about it, the light in us will fade to darkness. It's a conflict.
And, as Mr. S (Daniel Schwabauer, creator of the One Year Adventure Novel curriculum) says, conflict is pretty much the base of any good story. Without it, there's no reason to turn the page.
A flawed character naturally has conflict - it's born within. A struggle between light and dark, day and night, yin and yang.
A flawed character can either struggle with himself internally, or he can struggle with others externally because of his flaw. Both are very common and very useful. An example of a flaw that causes internal struggle would be confusion. He's always confused, things aren't what they seem, they're twisted - at least in his eyes. Therefore, he struggles within to flesh out what is and what is not.
For an external flaw, he could be uncontrollable, leading to arguments with just about everyone around him.
Both of those I have used. In fact, I've used them in the very same character (he's very flawed, by the way, far over the ordinary).
But there's much more to flaws. Flaws, unlike many other things, come from the character, not from an external force. It's not his or her fault she has the flaw, but not resisting it is. We all pretty much have a choice of resisting evil, and so should our characters.
That puts some weight on the character, which is good. It begins to add in personal stakes.
Moving on to the subject of villains. To what extent should you flaw a villain? The exact same amount as the hero. Villains are not pure, brooding evils. Sorry, but Sauron is not a good villain. He's not relatable - at all. Villains are merely people (yes, flawed, not necessarily overly-flawed, however), who react to bad circumstances in bad ways. At least, that's the ideal villain. The only difference between a hero and a villain (a hero could, in fact, be considerably more flawed than the villain), is that the hero chooses to take a moral stance as to how he will react to misfortune, and a villain will take an immoral stance.
But back on topic.
Flaws also make a character relatable, which you probably already know.
The reason, is, obviously, because we all are flawed.
You've heard that a million times already, I know - I have too. But it doesn't just make them relatable and realistic, it too adds conflict.
All stories are focused, based, and bred in conflict.
And another thing about flaws in villains that I hadn't realize until quite recent. In fact, right this moment.
Your villain should be flawed, yes. Your hero should be equally flawed. Every single character in your story should, in some way be flawed, because we as mortals are - it's in our blood. But a recurring theme in villains is that they go out to be emperors or killers or what not because of one single traumatic event in his or her lifetime. Now this does make sense. If his entire family was murdered in front of his eyes, that's going to hurt.
But chances are, he's not going to become a dictator. Why? Because he likely either won't have the resources, or, also very likely, he won't foster feelings of vengeance strong enough to devote his life to that.
Why not end it there with a .22 handgun?
Give him a reason for becoming what he is. Not the stereotypical reason, but something that would really lead him to do what he does. Chances are, if his village was raided, which caused his family's destruction, other children will suffer the same or similar acts - why is he so different than the rest?
But I kind of got off the topic of flaws.