Writing effective bad guys can be tricky. You want them to be three-dimensional, not flat, and you want them to be worthy opponents for your protagonist, but you don’t want to go overboard and give them so many extra coolness points that they end up stealing the show. If that happens, you might as well give up and give them the novel. Relabel them as a “rogue” or “antihero” and pretend that you meant to do it that way all along. The only thing harder than adding coolness points to a character who doesn’t have enough of them is removing them from a character who has too many.
But here are a few things you can try if (as is more common) your problem is a villain who’s not interesting enough:
Give them virtues to go along with their vices. If they’re ruthless and ambitious, make them brave and capable. If they’re dishonest, make them intelligent, or amusing, or kind to homeless people and stray animals. Real people are never only one thing, and your characters shouldn’t be, either.
Give them actual goals that they’re striving to achieve – not just “I want to rule the world/make lots of money,” but specific stuff like, “I want to rule the world because once I’m in charge of all of it there won’t be any reason for countries to fight each other any more” or “I want to make enough money to go back home to West Nowheresville and buy up the whole town and ruin all the people who made my high school years a living hell.”
Grant them the valid points in their arguments. Even in debates where one side is clearly Right and the other is clearly Wrong, the party of Wrong is still likely to have a couple of good arguments in their favor. Let your bad guys score those one or two measly points before your good guy brings out the steamroller of righteousness and flattens them like smashed pennies.
(Science fiction, I’m looking at you. As a genre, you have a long history of making all your conservatives sound like wild-eyed militaristic loons, or all your liberals sound like fuzzy-minded ineffectual do-gooders, depending upon the bias of the author. Please stop.)
Resist the urge to make your bad guys even more villainous by sticking extra and unrelated bad qualities onto them like artificial warts. Especially resist the urge to do this with whatever the criminal or moral bad thing of the moment happens to be. If your bad guys are attempting to take over a perfectly adequate and functioning government, for example, don’t give them a sideline in clubbing baby seals just because everybody knows that clubbing baby seals is bad.
And, finally, remember that – with the memorable exception of Shakespeare’s Iago and Richard III – most villains don’t think of themselves as villains, and don’t wake up in the morning saying, “Now, what villainous thing am I going to do today?”