That can differ depending on the story, and also on the message the author wants to convey, and of course the intended audience. The characteristics an author should take in mind for children's stories are different than for mature stories.
I am a writer myself, and for some reason I think I did my best jobs on my villains, or at least a lot of my villains. And important lesson of life is that "evil" does not exist, and that it's just a conception in which "good" people try to distinguish themselves from the "bad". This makes it interesting for me, as a POV style write to get into the mind of the villain and to see the world from their point of view. Even though their actions cannot be justified and are completely inexcusable, there can still be reason behind their "evil", and understanding how the villain thinks also makes that you understand their powers and weaknesses better. Quite often the villains even have a valid point behind their "evil".
Due to this I like characters most that you will also misjudge at first, but when the reader begins to understand the world from their point of view, you get a complete different picture. Villains are often perfect for that, since to them being on the "evil" side of the plot you easily want to dislike them at first, but if you get to know them, you may feel sorry for them and even gain sympathy for them, even knowing that they did something bad and need to be punished for that. This was my challenge when I set up my story for my "Secrets of Dyrt" RPG game, and the game has two prequel novels going into the deep of the villains of that game and give a pretty in-depth inside on how they eventually came to walk "the path of evil".
Now when I take it to work to other writers and even outside the scope of villains, misjudged "good" characters can also do a great deal. Luna Lovegood from Harry Potter is a good example. At first you'll take her for a complete lunatic idiot, but when you get to know her better you'll see she's sweet, brave and very intelligent, and that you can count yourself very extremely lucky if you have a friend like her. Luna is not a villain, but a character you easily misjudge on first impression nonetheless, and that's what I like about her.
You can easily guess that Severus Snape might well be one of the best fictional characters I've even seen. Seven books long you have no idea what game Snape is playing, and when it's all revealed at the end of of book 7, you realize you've been a fool