As a new writer I myself have fallen into the trap of creating a two dimensional villain. A villain who is evil simply for the sake of I need a villain for my hero to fight.
The problem with this is a story is almost as much about the villain as the hero. The villain is the evil that versus your heroes good and just like your hero needs flaws and faults to make him human your villain needs morals and reasons to make him human.
It is hard but if you can make your reader believe that your villain could do good or at least let your reader understand why he does what he does that is when you have a good villain.