Question: Is there a reason why Yeshiva students customarily pray only while wearing a nice suit jacket and not just while in their shirtsleeves?
Answer: Maran Ha’Shulchan Aruch (Chapter 98, Section 4) writes: “Prayer is in the place of sacrifices; thus, one must be careful that one’s prayer resembles an offering through concentration and not letting any foreign thoughts intrude into one’s prayer just as foreign thoughts invalidate an offering. It is correct for one to designate nice clothing for prayer, similar to the priestly garments; however, not everybody has the means to spend so much on this so at the very least, it is proper to have pants designated for prayer due to cleanliness.”
We can infer from these words that, although according to the letter of the law, it is permissible to pray in the clothes one wears the entire day, it is nevertheless preferable to wear a special garment for prayer and in this way, the garment will resemble the priestly garments worn by the Kohanim while performing the service in the Bet Hamikdash.
For this reason, Yeshiva students customarily wear a nice suit jacket for prayer services and there are those who customarily wear a hat as well. The greatest Sephardic luminaries were very meticulous about this as well and always prayed while wearing a hat (or have their Tallit draped over their head) and a respectable garment.
One must be especially careful about this when walking in places that are unclean and before praying, one must check one’s shoes to see that they are clean and not sullied by filth, in which case it would be prohibited to pray in this way. Similarly, Harav Refael Abul’afia writes explicitly that one must be careful to check one’s shoes prior to praying so that there is no filth on them, G-d forbid.
The saintly Rav of Kamarna writes (quoted by the Yalkut Yosef, Tefillah, Volume 1, page 384) that one who is careful to always wear clean clothes during prayer will be able to pray and beseech Hashem and will merit that all of his prayers and requests will be answered.
Additionally, one must also be exceedingly careful that one’s clothing do not contain Sha’atnez (a garment containing a blend of wool and linen), for besides transgressing a grave Torah prohibition by wearing such a garment, it also serves as an impediment to one’s prayers and one’s prayers will not be accepted.