٣١. يَـٰبَنِىٓ ءَادَمَ خُذُوا۟ زِينَتَكُمْ عِندَ كُلِّ مَسْجِدٍ وَكُلُوا۟ وَٱشْرَبُوا۟ وَلَا تُسْرِفُوٓا۟ ۚ إِنَّهُۥ لَا يُحِبُّ ٱلْمُسْرِفِينَ
[31] O children of Adam, dress yourselves fully, properly and decently at the time of every worship;20 eat and drink, but do not transgress, for Allah does not like the transgressors.21
20Here the word "Zinat"means full and proper dress. The verse exhorts the people to be fully clothed, when they are engaged in worship. For this purpose, it does not suffice to cover merely those parts of the body which the Law requires to be hidden in public in addition to the shameful parts. Therefore one should dress properly and decently so as to serve both the purposes, in accordance with one's means.
This command is meant to refute the wrong attitude which the ignorant people at that time had adopted, and have been adopting since then. They thought that one should worship Allah in perfect or semi-nudity and should put on a disheveled appearance before Him. In utter contrast to this, Allah not only prohibits nudity but also commands that one should be dressed fully, properly and decently at the time of worship and should put on an appearance that might not have even a tinge of untidiness and indecency.
21That is, "Allah does not like those people who transgress the limits imposed by Him by making the lawful as unlawful. That is why He does not approve of those who put on a disheveled appearance or starve themselves or deprive themselves of the lawful and pure flings under the foolish belief that they are pleasing their Allah thereby. He does not demand this as essential for His worship; nay, He is pleased if one wears a decent dress and makes use of the pure things provided by Him. According to His Law, the only thing that is sinful is to transgress His limits by making the lawful unlawful or the unlawful lawful."