What is the Torah source for Halachot regarding modest dress? What do the Rishonim comment on the topic?
1. In Devarim 23:15 we read that Hashem walks in our (military) camp, and that no matter of nakedness should be seen lest He leave us. From here we derive the prohibition of nakedness when in Hashem’s presence, e.g. for prayer, Torah study, etc. The term camp, however, implies that a constant restraint is required. The Rishonim consider the nature of nakedness (Ervah) and whether the prohibition of uncovering certain parts of the body is fixed or depends on social circumstances. All agree that certain areas of the body fall under the Torah prohibition, while others may be Drabanan, or depend on custom. 2. In Bamidbar 15:39 (a verse in Kriat Shma) we read “Do not stray after your hearts and after your eyes”, thus we should not wear provocative clothing which is alluring or suggestive of promiscuity. Again, the boundaries are set both by objective standards and custom. 3. In Devarim 22:5 we learn that a woman should not wear men’s clothing or a man women’s clothing. Some authorities explain that this is to discourage excessive intermingling of the sexes.