It is haraam for a woman to appear wearing pants in front of non-mahram men, because they do not cover the ‘awrah in the manner required in sharee’ah, rather they show her charms, in addition to making her resemble men and kaafir women. All of that is known to be haraam.
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) said: I think that the Muslims should not follow this fashion and wear the clothes that come to us from here and there. Many of them are not compatible with the Islamic dress code which completely covers the woman, such as clothes that are short, very tight or see-through. That includes pants, which show the size of the woman’s legs, stomach and waist. Wearing them is included in the saheeh hadeeth “There are two types of the people of Hell whom I have not seen: people with whips like the tails of cattle, with which they strike the people, and women who are clothed yet naked, walking with an enticing gait, with something on their heads that looks like the humps of camels, leaning to one side. They will never enter Paradise or even smell its fragrance, although its fragrance can be detected from such and such a distance.” End quote. The hadeeth was narrated by Muslim (2128).
He also said: What I think is that it is haraam for women to wear pants because this is an imitation of men, and the Prophet (peace and blessings of Allaah be upon him) cursed women who imitate men. It also makes women less modest, because it opens the door to the garments of the people of Hell, as the Prophet (peace and blessings of Allaah be upon him) said: “two types of the people of Hell whom I have not seen” and he described them as “women who are clothed yet naked, walking with an enticing gait, with something on their heads that looks like the humps of camels, leaning to one side. They will never enter Paradise or even smell its fragrance”. End quote from Majmoo’ Fataawa al-Shaykh Ibn ‘Uthaymeen.
It says in Fataawa al-Lajnah al-Daa’imah (17/102): It is not permissible for her to wear pants, because that is women imitating men.
The prohibition on wearing pants if waived if they are worn beneath her garment, but wearing them beneath a shirt, even if it reaches the knees, is not permissible, because the reason for the prohibition is still present.
Shaykh ‘Abd al-Razzaaq ‘Afeefi (may Allaah have mercy on him) said: A woman may wear pants with a completely covering garment above them, that does not make her resemble men, because she is wearing them underher garment.
End quote from Fataawa al-Shaykh ‘Abd al-Razzaaq ‘Afeefi, p. 573.
We praise Allaah for making you keen to seek that which is halaal and ask about it, and we ask Him, may He be glorified and exalted, to increase you in guidance and piety, and to help you to avoid temptation both apparent and hidden, and to protect the Muslim women from all evil.
And Allaah knows best.