Question
What is the ruling on praying unclothed or in impure clothes?
Answer
الحمد لله، والصلاة والسلام علىٰ رسول الله، أما بعد!
Your question consists of two parts:
First point: The ruling on wearing clothes in prayer
◈ If one is able to, it is necessary to wear full clothing at the time of prayer.
◈ At the very least, clothing that covers the awrah must be worn.
◉ The awrah for a man: from the navel to the knees.
◉ The awrah for a woman: the whole body.
Allah the Almighty says:
يَا بَنِي آَدَمَ خُذُوا زِينَتَكُمْ عِنْدَ كُلِّ مَسْجِدٍ
O children of Adam! Take hold of your adornment when you prostrate.
◈ The people of knowledge are agreed that if someone prays unclothed despite being able to dress, his prayer is invalid.
Second point: The ruling on praying without purification
◈ Purification is a condition for the validity of the prayer.
◈ Muslims should know that:
➊ It is obligatory to be purified from the minor impurity and the major impurity.
➋ Praying without wudu is invalid, whether out of forgetfulness or deliberately.
➌ It is obligatory to repeat such a prayer.
◈ If someone does so deliberately, then:
➊ He commits a major sin and a grave act of disobedience.
The way of repentance
◈ Whoever prays without purification should:
➊ Repent to Allah and seek His forgiveness.
➋ Make a firm resolve not to do so again.
➌ Repeat the prayer that was performed without wudu.
◈ Allah the Almighty accepts the repentance of those who repent.
Conclusion
◈ Covering the awrah in prayer is obligatory.
◈ The prayer cannot be valid without purification.
◈ In both cases the prayer becomes invalid and must be repeated.
هذا ما عندي والله اعلم بالصواب