I got this from the manila cathedral website not too long ago. And i agree. I think it is only but proper that we observe a dress code when we go to church. It shouldn't be an imposition but rather we disseminate it as a guide.
Some would say that what we wear won't matter to God. Probably. But it does matter to certain churchgoers. Wearing eye catching apparels like shorts and tank tops that shows more skin rather than hide it , makes other's pass judgment on you even if they don't want to. Sometimes, it's all in the subconscious. We sin some more because of external stimuli outside of the church but we should try to make the internal environment of the church free from distractions.
Our clothes need not be new, just clean and modest. But for those who doesn't even have nowhere to sleep,barely able to buy food for their stomach and goes to church in the clothes that they slept in last night, that's ok i guess. So long as we do make the effort to worship. I think.