This is a very good questions and engages two important issues in the history of philosophy and theologyu. The first is that of free will and predestination: if the gods have determined Oedipus' fate (by the curse laid upon the house of Atreus) how can Oedipus be considered responsible for his actions? Second, are acts judged evil by their intentions or their consequences?
One way to think through these questions in terms of ancient Greek religion is to consider the importance of "miasma" or ritual pollution. A person who offended the gods by committing acts which caused him to become unclean or ritually polluted brought the anger of the gods down on the entire city. Oedipus' killing his own father and marrying his mother both make him ritually unclean; thus the gods send a plague on the entire city until this pollution is cleansed. Oedipus' self mutilation and resignation of kingship purify the city (see Oedipus at Colonus for the final resolution of the Oedipus story). The issue isn't so much evil in the modern sense, but pollution and its effects on the city.