Religion (when discussed as a virtue) is a distinct moral virtue whose purpose is to render God the worship due to Him as the source of all being and the giver of all good things. As such it is part of the cardinal virtue of Justice, and falls under obedience to the First Commandment.
According to Lactantius and endorsed by St. Augustine "religion" comes from religare, to bind, and thus it would mean the bond uniting man to God.
Thomas Aquinas discusses the virtue of Religion in "Summa Theologica", II-II, Q. lxxxi. Since order is an aspect of good, and Religion orders man's relationship to God, Aquinas finds it a distinct virtue whose purpose is to render God the worship due to Him as the source of all being. He views the virtue of Religion as indispensable for attaining the end to which divine providence has ordained humanity —everlasting happiness in communion with God.
The virtue of Religion is differentiated from other virtues by its object, which is to offer to God the homage demanded by His entirely singular excellence. It is not a theological virtue, because its immediate object is not God, but rather the reverence to be paid to Him. It entails obedience to the First Commandment. As a sense of the sacred involves the virtue of Religion, this also pertains to the Second Commandment.
Although its practice is associated with the virtues of faith and charity, theologians generally follow Aquinas in placing it among the moral virtues, as a part of the cardinal virtue Justice, since by it one renders God what is due to Him. In Luke 4:8 Jesus quotes Deuteronomy 6:13, " "It is written: 'You shall worship the Lord, your God, and him alone shall you serve.'"
Aquinas ranks it first among moral virtues. A religious attitude towards God is essentially the product of one's recognition, not only of His sovereign majesty, but also of one's absolute dependence on Him. Hence we are bound to cherish habitually towards Him sentiments of adoration, praise, thanksgiving, loyalty, and love. Just as Aquinas finds a distinction between naturally acquired and the divinely infused virtues of Temperance, so also he sees a separate infused virtue of Religion. The virtue of Religion is perfected by the Gift of Piety.
The chief acts of this virtue are adoration, prayer, sacrifice, oblation, and vows. Joseph Rickaby describes "worship" as the recognition of one's dependence upon God. Of course God does not need anyone's worship, whether interior or exterior. It is not because it is strictly speaking of use to Him that one renders it, but because He is infinitely worthy of it.
Adoration is the first act of the virtue of religion. The Catechism of the Catholic Church states that "Adoration is the acknowledgement of God as God, creator and savior, the Lord and master of everything that exists as infinite and merciful love." For Aquinas, devotion results in spiritual joy based on a contemplation of the goodness of God. Although a person may begin to practice Religion out of a sense of duty, the more one reveres God, the more "...our mind is subjected to him, wherein our perfection consists, since a thing is perfected by being subject to its superior.
As man is a composite being of both body and soul, his composite nature needs to express itself by outward acts in which the body as well as the soul shall have a part — this not only to spur on one's inner feelings, but also because God owns us body and soul, and it is right that both should show their fealty to Him. This is the justification of external religion. Rickaby borrows a line from the English marriage service. "With my body I thee worship", and observes that worship is a function of social man. "In the order of nature you have first the congregation, then the priest and the altar, expressive of the common desire to adore some power above the community, to whom the community owes allegiance, the worship of whom paid by all in common is the cement of that society." Like other moral virtues, the virtue of Religion is acquired through habit and practice. It is instilled by Sacraments, by prayer, and the company of religious people, not by Catechism alone.
The sins against Religion are neglect of prayer, blasphemy, tempting God, sacrilege, perjury, simony, idolatry, and superstition. Since atheism rejects or denies the existence of God, it is a sin against the virtue of religion.
According to Anne Abbott, classic films like The Bells of St. Mary's, The Song of Bernadette, Heaven Knows, Mr. Allison and The Reluctant Saint all reflect the virtue of religion, which derives from the dignity of the human person.