In the book Fiqh As-Sunnah, the late Sheikh Sayyed Sabiq, may Allah bless his soul, states the following:
“Covering the `Awrah is one of the prerequisites of Salah. Allah says in the Qur’an: “O Children of Adam, take your adornment (by wearing proper clothing) for every mosque.” (Al-A’raf 31). The word “adornment” here refers to covering the `Awrah, while the word “mosque” means “prayer.” Therefore, the whole phrase means “Cover your `Awrah for every prayer.” Salamah Ibn Al-Akwa’ said to the Prophet, peace and blessings be upon him, “O Messenger of Allah, may I pray in a long shirt?” He said, “Yes, but button it, even with just a thorn.” (Reported by Al-Bukhari.)

Man’s `Awrah:

as for man, he has to cover what is between the navel and thighs. But there is disagreement about the exposing of the navel, thighs and knees. The following Hadiths prove that such parts are not part of man’s `Awrah.
`Aa’ishah, may Allah be pleased with her, narrates: “The Prophet was sitting with his thigh exposed when Abu Bakr sought, and received, permission to enter. The same thing happened with `Umar. However, when `Uthman sought permission to enter, the Prophet covered himself with his clothes. When they left, I said, ‘O Messenger of Allah, you allowed Abu Bakr and `Umar to enter while your thigh was exposed. But when `Uthman asked permission to enter, you covered yourself with your clothes.’ He said, ‘O ‘Aishah, shouldn’t I be shy of a man even the angels, by Allah, feel bashful in his presence’?” (Related by Ahmad and Al-Bukhari.)

Ibn Hazm says: “It is correct to say that the thigh is not part of `Awrah, saying otherwise will conflict with the fact that Allah allowed His Prophet, who is protected (from sin), to uncover his thigh so that Anas and others could see it? Allah would have kept him from doing this. According to Jabir as recorded in the two Sahihs(authentic books of Al-Bukhari and Muslim), when the Prophet was young (before his prophethood), he was once carrying the stones of the Ka’bah, wearing only a loincloth. His uncle al-`Abbas said to him, ‘O nephew, why don’t you untie your waistcloth and put it on your shoulder for padding?’ The Prophet did so and fell unconscious. He was never seen naked again after that.”‘

Ibn Hazm mentions that Hubair Ibn Al-Huwairith looked at Abu Bakr’s thigh when it was uncovered, and that Anas Ibn Malik came to Qas Ibn Shammas when his thigh was uncovered.

however, the following hadiths are cited to show that the thighs and so on are part of `Awrah:
Muhammad Jahsh reported: “The Messenger of Allah, peace and blessings be upon him, passed by Ma’mar while his thighs were uncovered. He said, to him,‘O Ma’mar, cover your thighs, for they are (part of) `Awrah.” This is related by Ahmad, al-Hakim and al-Bukhari in Tareekh and in mu’allaq form in his Sahih.

Reported Jurhad, “The Messenger of Allah passed by me when the cloak I was wearing was a little bit off my thigh. He said, ‘Cover your thigh, for it (is part of) `Awrah.” This is related by Ahmad, Abu Dawood and At-Tirmidhi, who called it Hasan, and by Al-Bukhari in Mu’allaq form in the Sahih.

Woman’s `Awrah:

there is no such controversy over what constitutes a woman’s `Awrah. It is stated that her entire body is `Awrah and must be covered, except her hands and face. Says Allah in the Qur’an: “And to display of their adornment only that which is apparent (do not expose any adornment or beauty save the hands and face).”
It has been authentically related on the authority of Ibn `Abbas, Ibn `Umar and `Aa’ishah that the Prophet, peace and blessings be upon him, said: “allah does not accept the prayer of an adult woman unless she wears a head covering (khimar, hijab).” This is related by “the five,” except for An-Nasa’i, and by Ibn Khuzaimah and Al-Hakim. At-Tirmidhi grades it as Hasan.

It is related from Umm Salamah that she asked the Prophet, “Can a woman pray in a long shirt (like a night shirt) and head covering without a loincloth?” He said, “If the shirt is long and flowing and covers the top of her feet (i.e. it’s allowed to do do).” This is related by Abu Dawood. The scholars say it is Sahih in Mauqoof form (as a statement of Umm Salamah and not that of the Prophet.)

It is also related that on being asked about kinds of garments a woman is allowed to pray in, `Aa’ishah answered, “Ask `Ali Ibn Abu Talib and then tell me what he says.” ‘Ali’s answer was, “In a head cover and a long flowing shirt.” On conveying this reply to `Aa’ishah, she said, “He has told the truth.”
the clothes worn must cover the `Awrah, even if they are tight enough to highlight those features. If the clothes are so thin that one’s skin color can be seen, they are not suitable for prayer.”