All perfect praise be to Allah and may His blessings and peace be upon our Prophet Mohammad and upon all his family and companions.
Muslim jurists unanimously agree that covering the Awrah {parts of the body that must be concealed during prayer} is amongst the conditions for the validity of prayer. The Awrah that men should cover during the prayer is: what is between the navel and the knee. The Prophet (PBUH) said: “ Cover your thigh as the thigh is Awrah “{ Al-Tirmizi }.
It is imperative that the color of the skin isn`t recognized, even if it was covered with a tight garment. However, it is better for the praying person to wear a garment that is loose enough to cover his Awrah. Al-Imam An-Nawawi said: “ Covering the Awrah must be done through wearing garment which isn`t thin, transparent, or thick and outlined the features of the body. However, if the garment covered the color of the skin but the size of the knee and the buttocks were outlined then the prayer is valid………This purpose can be achieved by wearing most types of garments that don`t show the color of the skin, and there is no Juristic disagreement in this regard. “ {Al-Majmou`3/170}.
Therefore, offering prayer in trousers/pants or leading prayer in them is valid, and the same ruling applies to the person who performs these acts without keeping his beard. This is because keeping the beard isn`t amongst the conditions for the validity of prayer or leading people in prayer though it is better for a Muslim to keep his beard so as to follow in the footsteps of the Prophet {PBUH} and obey his command since he said: “Keep the beards and cut the mustaches short.” {Bukhari}. And Allah knows best.