The purpose for doing something is more of a determinant of its evil/good nature than the act itself.
For example, rather effectively running a Republicrepublic to victory in a war against some pretty bad dudes can actually be a pretty evil thing if the reason you do it is as a ruse to implement a plan to kill all the Jedicommit genocide on a rival group and take over the Republicthat republic and make it into an Empireempire.
Likewise, killing people can be inherently good if you're doing it to protect the lives of the innocent.
Both of those examples are in the star wars world...but parallels exist in ours too. Someone that kills someone that was attempting to murder innocents is hailed as a hero, not a villain for having killed. It was the reason for the action that determined the evil/good nature of it.