Xehanort had the chance to not ever pursue studies of the heart, but rather than listening to Ansem the wise and the King, he kept on going along with the other 5 diciples. Those original 6 can be considered evil, as they are the ones responsible for overrunning Radiant Garden with heartless and creating the "marked" heartless.
Organization XIII on the other hand, started out with good intentions. They formed under Xemnas to get their hearts back, since without hearts, they were wandering and confused nothings. The Organization became corrupt over time, and traitors such as Marluxia and Larxene rebelled in order to get back to the real goal. Xemnas and Saix strayed from the original plan, they didn't want just their hearts back, but godlike powers in order to control and reshape the worlds the way they see fit.
The way the Organization wanted to achieve their goals, through lieing and causing chaos, would be evil, but the intention was not. I don't like that Sora just killed them without asking questions, he never truly understood them.