Of all of St. Thomas Aquinas theological writings, his writings on the Seven Deadly Sins are likely the most famous, having a solid spot in even today's popular culture. The history of the sins is much lengthier, however, than Aquinas' involvement.
The Greek theologian Evagrius of Pontus originally started this religious thread, by creating the notion of the 8 wicked human passions: gluttony, lust, avarice, sadness, anger, acedia, vainglory, and pride. Pope Gregory the Great revamped the list, combining vainglory and pride, acedia and sadness, and adding envy. He also ranked them based upon their violation of the principle of love: pride, envy, anger, sadness, avarice, gluttony, and lust. Aquinas, in his Summa Theologiae (Summary of Theology), wrote on these human passions, which resulted in the modern list: pride, envy, wrath, sloth, gluttony, lust, and greed (Covetousness).
I have provided some quotes here from Summa Theologiae to illuminate the philosophy behind the meaning of "sin" and the its most potent forms:
Sin is nothing else than a bad human act. Now that an act is a human act is due to its being voluntary, as stated above, whether it be voluntary, as being elicited by the will, e.g. to will or to choose, or as being commanded by the will, e.g. the exterior actions of speech or operation. Again, a human act is evil through lacking conformity with its due measure: and conformity of measure in a thing depends on a rule, from which if that thing depart, it is incommensurate. Now there are two rules of the human will: one is proximate and homogeneous, viz. the human reason; the other is the first rule, viz. the eternal law, which is God's reason, so to speak. Accordingly Augustine includes two things in the definition of sin; one, pertaining to the substance of a human act, and which is the matter, so to speak, of sin, when he says "word," "deed," or "desire"; the other, pertaining to the nature of evil, and which is the form, as it were, of sin, when he says, "contrary to the eternal law."
I interpret this to mean that sin is anything (action or not) which violates the "eternal law", that which lacks "conformity".
It would seem that sin has no cause. For sin has the nature of evil, as stated above . But evil has no cause, as Dionysius says. Therefore sin has no cause. Further, a cause is that from which something follows of necessity. Now that which is of necessity, seems to be no sin, for every sin is voluntary. Therefore sin has no cause.
It would seem that sin has no internal cause. For that which is within a thing is always in it. If therefore sin had an internal cause, man would always be sinning, since given the cause, the effect follows.
This seems necessary for the Christian definition of man. For man to be a part of God's larger plan, he can have no predisposition for evil. Thus, sin must have no instinctual cause, but must be a result of evil (a fundamental component of the Christian world). However, the idea is contrary to modern ideas of justice and punishment, in which "sin"/]crime] is a result of human nature, environment, etc.
Aquinas says on the possible motivations of sin (The parenthetical titles are mine):
Now we must observe that the reason directs human acts in accordance with a twofold knowledge, universal and particular: because in conferring about what is to be done, it employs a syllogism, the conclusion of which is an act of judgment, or of choice, or an operation. Now actions are about singulars: wherefore the conclusion of a practical syllogism is a singular proposition. But a singular proposition does not follow from a universal proposition, except through the medium of a particular proposition: thus a man is restrained from an act of parricide, by the knowledge that it is wrong to kill one's father, and that this man is his father. Hence ignorance about either of these two propositions, viz. of the universal principle which is a rule of reason, or of the particular circumstance, could cause an act of parricide. Hence it is clear that not every kind of ignorance is the cause of a sin, but that alone which removes the knowledge which would prevent the sinful act. Consequently if a man's will be so disposed that he would not be restrained from the act of parricide, even though he recognized his father, his ignorance about his father is not the cause of his committing the sin, but is concomitant with the sin: wherefore such a man sins, not "through ignorance" but "in ignorance," as the Philosopher (Aristotle) states (Ethic. iii, 1).
It is evident that the apprehension of the imagination and the judgment of the estimative power follow the passion of the sensitive appetite, even as the verdict of the taste follows the disposition of the tongue: for which reason we observe that those who are in some kind of passion, do not easily turn their imagination away from the object of their emotion, the result being that the judgment of the reason often follows the passion of the sensitive appetite, and consequently the will's movement follows it also, since it has a natural inclination always to follow the judgment of the reason.
Man like any other being has naturally an appetite for the good; and so if his appetite incline away to evil, this is due to corruption or disorder in some one of the principles of man: for it is thus that sin occurs in the actions of natural things. Now the principles of human acts are the intellect, and the appetite, both rational (i.e. the will) and sensitive. Therefore even as sin occurs in human acts, sometimes through a defect of the intellect, as when anyone sins through ignorance, and sometimes through a defect in the sensitive appetite, as when anyone sins through passion, so too does it occur through a defect consisting in a disorder of the will.
(On the devil as cause of sin)
Augustine proves (De Lib. Arb. i, 11) that "nothing else than his own will makes man's mind the slave of his desire." Now man does not become a slave to his desires, except through sin. Therefore the cause of sin cannot be the devil, but man's own will alone.
I answer that, Sin is an action: so that a thing can be directly the cause of sin, in the same way as anyone is directly the cause of an action; and this can only happen by moving that action's proper principle to act. Now the proper principle of a sinful action is the will, since every sin is voluntary. Consequently nothing can be directly the cause of sin, except that which can move the will to act.
Now the will can be moved by two things: first by its object, inasmuch as the apprehended appetible is said to move the appetite: secondly by that agent which moves the will inwardly to will, and this is no other than the will itself, or God. Now God cannot be the cause of sin. Therefore it follows that in this respect, a man's will alone is directly the cause of his sin.
(On God as cause of sin)
It is written (Wis. 11:25): "Thou . . . hatest none of the things which Thou hast made." Now God hates sin, according to Wis. 14:9: "To God the wicked and his wickedness are hateful." Therefore God is not a cause of sin.
Aquinas denied the ability of the sins to be ordered (he didn't agree with Gregory the Great's organization). Dante Alighieri, poet of the Divine Comedy, fractured the sins even further and organized them very precisely, putting those Christians who The Seven Deadly Sins in Purgatory, and those other in Hell. Dante's sinners were organized as follows, from least sinful to most sinful (based upon their proximity to the bottom rung of hell):
(The Gate of Purgatory)
Mohandas Karamchand Gandhi also had a list: