Article 1. Whether good can be the cause of evil?
I answer that, 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.
And if we consider the special kinds of causes, we see that the agent, the form, and the end, import some kind of perfection which belongs to the notion of good. Even matter, as a potentiality to good, has the nature of good. Now that good is the cause of evil by way of the material cause was shown above (48, 3). For it was shown that good is the subject of evil. But evil has no formal cause, rather is it a privation of form; likewise, neither has it a final cause, but rather is it a privation of order to the proper end; since not only the end has the nature of good, but also the useful, which is ordered to the end. Evil, however, has a cause by way of an agent, not directly, but accidentally.
In proof of this, we must know that evil is caused in the action otherwise than in the effect. In the action evil is caused by reason of the defect of some principle of action, either of the principal or the instrumental agent; thus the defect in the movement of an animal may happen by reason of the weakness of the motive power, as in the case of children, or by reason only of the ineptitude of the instrument, as in the lame. On the other hand, evil is caused in a thing, but not in the proper effect of the agent, sometimes by the power of the agent, sometimes by reason of a defect, either of the agent or of the matter. It is caused by reason of the power or perfection of the agent when there necessarily follows on the form intended by the agent the privation of another form; as, for instance, when on the form of fire there follows the privation of the form of air or of water. Therefore, as the more perfect the fire is in strength, so much the more perfectly does it impress its own form, so also the more perfectly does it corrupt the contrary. Hence that evil and corruption befall air and water comes from the perfection of the fire: but this is accidental; because fire does not aim at the privation of the form of water, but at the bringing in of its own form, though by doing this it also accidentally causes the other. But if there is a defect in the proper effect of the fire--as, for instance, that it fails to heat--this comes either by defect of the action, which implies the defect of some principle, as was said above, or by the indisposition of the matter, which does not receive the action of the fire, the agent. But this very fact that it is a deficient being is accidental to good to which of itself it belongs to act. Hence it is true that evil in no way has any but an accidental cause; and thus is good the cause of evil.
Article 2. Whether the supreme good, God, is the cause of evil?
I answer that, As appears from what was said (1), the evil which consists in the defect of action is always caused by the defect of the agent. But in God there is no defect, but the highest perfection, as was shown above (4, 1). Hence, the evil which consists in defect of action, or which is caused by defect of the agent, is not reduced to God as to its cause.
But the evil which consists in the corruption of some things is reduced to God as the cause. And this appears as regards both natural things and voluntary things. For it was said (1) that some agent inasmuch as it produces by its power a form to which follows corruption and defect, causes by its power that corruption and defect. But it is manifest that the form which God chiefly intends in things created is the good of the order of the universe. Now, the order of the universe requires, as was said above (22, 2, ad 2; 48, 2), that there should be some things that can, and do sometimes, fail. And thus God, by causing in things the good of the order of the universe, consequently and as it were by accident, causes the corruptions of things, according to 1 Kgs. 2:6: "The Lord killeth and maketh alive." But when we read that "God hath not made death" (Wisdom 1:13), the sense is that God does not will death for its own sake. Nevertheless the order of justice belongs to the order of the universe; and this requires that penalty should be dealt out to sinners. And so God is the author of the evil which is penalty, but not of the evil which is fault, by reason of what is said above.
(Summa Theologica)