A lengthy essay on all the lofty ideas regarding modesty is not what's intended here. So much more can be, and has been, said on the topic. This is only a reminder of why this is such an important subject for the Christian. Let's look at St. Paul's Epistle to the Romans 12:1-2:
I beseech you therefore, brethren, by the mercy of God, that you present your bodies a living sacrifice, holy, pleasing unto God, your reasonable service. And be not conformed to this world; but be reformed in the newness of your mind, that you may prove what is the good, and the acceptable, and the perfect will of God.
That's pretty straightforward. Our bodies are temples of the Living God and as such should be presented to Him in a way that would please Him. And we should not be concerned with the passing things of the world, but with God, His will, and the things of eternity.
Now let's look at what the most recent Catechism has to say about modesty:
Modesty inspires a way of life which makes it possible to resist the allurements of fashion and the pressures of prevailing ideologies. The forms taken by modesty vary from one culture to another. Everywhere, however, modesty exists as an intuition of the spiritual dignity proper to man. It is born with the awakening consciousness of being a subject. Teaching modesty to children and adolescents means awakening in them respect for the human person.(2523-2524)What may we glean from this? (1) That fashions, whether immodest or modest, are not to be of concern to the Christian, since this world--along with all its vanities--is passing. (2) That God, who loves us, has endowed us with inherent dignity. (3) That we should teach modesty to our children in order for them to properly respect themselves and others.
How does this relate to a person's manner of attire? If we look at what the Church teaches us in the Catechism alone, without further looking to past popes or the saints and what they have said on the subject, then it seems fairly simple. We ought to dress according to what we are: sons and daughters of the Most High God. We dress not to impress people, but to respect God and ourselves. Since our bodies are temples of the Holy Ghost, we ought to remember this and keep ourselves properly covered as much as possible.
Further, if we are attending mass, it is of utmost importance that we remember in whose presence we are. We are before our Eucharistic Lord, all the angles, and the saints who worship with us. If we were going to an important meeting, to a wedding, to court, to a restaurant, we would dress appropriately. How much more important it is to dress appropriately before the Holy Trinity: Jesus in the Eucharist, God the Father who is our ultimate and just Judge, and with the inspiration of the Holy Ghost.
And of course, we should always remember Our Lady when we dress for holy mass. Remember Her message at Fatima, that "certain fashions are going to be introduced which will offend Our Lord very much....the Church has no fashions; Our Lord is always the same."
"Our Lord is always the same." What is Our Lady reminding us of here? This world is fleeting, but our lives with God are eternal. Heaven is our home. God desires our obedience because He loves us, and our manner of dress can be an example of this. In a seemingly small way, our modesty in dress in an immodest world can be a reminder to those around us of Him with whom our allegiance lies.
In a practical sense, does this mean we have to dress up all the time? Of course not. How impractical that would be. In fact, the beautiful St. Ambrose said so many centuries ago:
The body should be bedecked naturally and without affectation, with simplicity, with negligence rather than nicety, not with costly and dazzling apparel, but with ordinary clothes, so that nothing be lacking to honesty and necessity, yet nothing be added to increase its beauty.St. Ambrose makes it clear that it is possible to dress in a dignified way, without revealing too much of our bodies, without going to great expense or extravagance, simply and neatly, while still being able to function in our daily activities.* It's important that we refrain from promoting a lack of chastity and respect.
At mass we join all of Heaven in worshiping God, who grants us an unspeakable grace when He becomes present bodily for us. It is incumbent upon us that we remember this great gift--the salvation that was won by His suffering and death on the cross, and His continued Eucharistic love for us--and leave our tank tops and shorts at home.
The Catholic Encyclopedia says this:
In the government of the exterior of a man modesty aims to make it conform to the demands of decency and decorousness (honestas).Interestingly, the Catholic Encyclopedia places its discussion of modesty under the heading of "temperance," which is considered a cardinal virtue, because modesty has to do with moderation and self-control.**
Though the topic of dress is of concern to both men and women, the problem of modesty so often falls to women since what is depicted as "attractive" attire for women (and even girls) is so often sexually explicit and demeaning. Therefore it is so easy to lose perspective as to what is appropriate. So let's just try to remember what the great St. Francis de Sales said in his Introduction to the Devout Life, and we cannot go wrong:
...avoid all affectation, vanity, curiosity, or levity in your dress. Keep yourself always, as much as possible, on the side of plainness and modesty, which, without doubt, is the greatest ornament of beauty, and the best excuse for the want of it.* The Angelic Doctor discusses St. Ambrose as well as St. Gregory the Great, Aristotle, St. Cyprian, and St. Augustine here. Please see also Turtullian here: On the Apparel of Women.
**Although the Angelic Doctor distinguishes between temperance and modesty.