Hard to tell sometimes.
Growing up, we always thought good guys had the white hats, bad guys wore black, right? And the good guys did good stuff, while the bad guys did really bad things.
Our good guys (translation: do-gooders, heroes, champions) and bad guys (translation: evildoers, villains, malefactors) in our writing share differences, but they also share similarities. They have to or they're not interesting. A pure good guy is boring, and a pure bad guy is just not believable. Let's take a look under the hood.
Good guys always do good stuff, right?
I watched a Star Trek episode recently where the distinct life forces of an extinct civilization had taken over one of the crew members. Kirk's solution: place the crew member in a pressure chamber and crank up the pressure until all the life forces were destroyed. Basically, he committed genocide. And Kirk's one of the good guys, right?
Another example: Superman, the ultimate Boy Scout, in the second Superman movie with Christopher Reeve, has no trouble eliminating Zod, Ursa, and Non. Didn't give it a second thought. No attempt at returning them to the phantom zone, just poof!
Now, the flip side. One of everyone's favorite bad guys, Darth Vader, Mr. All-In-Black himself. Evildoer, right? Killed children, women, pretty much anyone. But he started out with great promise, as a good guy. Followed the wrong path for a while. But in the end, who saves the day by destroying (we think) the Emperor? Darth.
So, a couple of things to remember. When creating your bad guys and good guys, they're not pure. Shouldn't be. Your good guys should have some darkness in them. Makes them interesting. And your bad guys will do some good stuff occasionally. And sometimes, they might just flip sides. It all depends on perspective.
Now, go forth and think about other good/bad guys you've read about or watched on the screen.
I command it.
Keep writing, friends.