Summa Theologiae I, Q. 48 & 49: Evil
Excerpts from the Summa Theologiae on Evil.
Q. 48: The Distinction of Things in Particular
[A. 1] Whether Evil is a Nature?
Respondeo, One opposite is known through the other, as darkness is known through light. Hence also what evil is must be known from the nature of good. [...] Hence it cannot be that evil signifies being, or any form or nature. Therefore it must be that by the name of evil is signified the absence of good. And this is what is meant by saying that evil is neither a being nor a good. For since being, as such, is good, the absence of one implies the absence of the other.
[A. 4] Whether Evil Corrupts the Whole Good?
Respondeo, Evil cannot wholly consume good. To prove this we must consider that good is threefold. One kind of good is wholly destroyed by evil, and this is the good opposed to evil, as light is wholly destroyed by darkness, and sight by blindness. Another kind of good is neither wholly destroyed nor diminished by evil, and that is the good which is the subject of evil; for by darkness the substance of the air is not injured. And there is also a kind of good which is diminished by evil, but is not wholly taken away; and this good is the aptitude of a subject to some actuality.
Q. 49: The Cause of Evil
[A. 1] Whether good can be the cause of evil?
Respondeo, It must be said that every evil in some way has a cause. For evil is the absence of the good, which is natural and due to a thing. But that anything fail from its natural and due disposition can come only from some cause drawing it out of its proper disposition. For a heavy thing is not moved upwards except by some impelling force; nor does an agent fail in its action except from some impediment. But only good can be a cause; because nothing can be a cause except inasmuch as it is a being, and every being, as such, is good.
Ad Primum, As Augustine says (Contra Julian. i): The Lord calls an evil will the evil tree, and a good will a good tree. Now, a good will does not produce a morally bad act, since it is from the good will itself that a moral act is judged to be good. Nevertheless the movement itself of an evil will is caused by the rational creature, which is good; and thus good is the cause of evil.