Ruling on appointing a woman as a judge
Question

Is it permissible for a woman to be a judge?.
Praise be to Allah.The majority of scholars are of the view that it is not permissible for a woman to be appointed as a judge, and if she is appointed, the one who appointed her is sinning, and her appointment is invalid, and her judgements carry no weight, no matter what ruling she passes. This is the view of the Maalikis, Shaafa’is and Hanbalis, and of some of the Hanafis. 
See: Bidaayat al-Mujtahid (2/531); al-Majmoo’ (20/127); al-Mughni (11/350). 
They quoted a number of texts as evidence for that: 
1 –Allaah says (interpretation of the meaning):  
“Men are the protectors and maintainers of women, because Allaah has made one of them to excel the other, and because they spend (to support them) from their means” [al-Nisa’ 4:34]
So the men are the protectors and maintainers of women, in the sense that they are in charge of them. So the verse may be understood as meaning that women cannot be appointed in charge, otherwise women would be the protectors and maintainers of men, which is the opposite of what the verse says. 
2 – Allaah says (interpretation of the meaning): 
“but men have a degree (of responsibility) over them” [al-Baqarah 2:228]
Allaah has granted men a degree over women ,and if a woman were to be appointed as judge that would contradict the degree that Allaah has given men in this verse, because in order for a judge to judge between two disputants, he must have a degree over them. 
3 – It was narrated that Abu Bakrah (may Allaah be pleased with him) said: When the Messenger of Allaah (peace and blessings of Allaah be upon him) heard that the people of Persia had appointed the daughter of Chosroes as their ruler, he said: “No people will ever prosper who appoint a woman in charge of their affairs.” Narrated by al-Bukhaari (4425). 
The fuqaha’ quoted this verse as evidence that it is not permissible to appoint a woman as a judge, because lack of prospering is a kind of harm, the causes of which must be avoided. The hadeeth is general in meaning and applies to all positions of public authority. So it is not permissible to appoint a woman, because the word “affairs” is general in meaning and includes all the public affairs of the Muslims.
 Al-Shawkaani (may Allaah have mercy on him) said: 
There is no stern warning greater than stating that they will never prosper, and the most important issue is to rule according to the rulings of Allaah, may He be glorified and exalted, and therefore this warning applies more emphatically to women. End quote. Al-Sayl al-Jaraar (4/273) 
The Fatwa Committee of al-Azhar said: 
The Messenger (peace and blessings of Allaah be upon him) did not intend by this hadeeth only to state that the people who appoint a woman in charge of their affairs will not prosper, because his task was to explain everything that is permissible for his ummah, so that they may succeed and prosper, and everything that is not permissible for them so that they may be safe from evil and loss. Rather he intended to forbid his ummah from imitating those people (the Persians) by delegating any of their public affairs to a woman, and he used this incident to convey this message to the people who were keen to be prosperous so that they would comply with this advice. The Prophet (peace and blessings of Allaah be upon him) used definitive language to state that lack of prosperity is inevitable when a woman is appointed in charge of any affairs. Undoubtedly the prohibition that is derived from this hadeeth applies to any woman in any era; women are not to be appointed to positions of public authority. This general meaning is understood from the wording of the hadeeth. End quote. 
4 – Moreover, the nature of woman means that a woman should not be appointed to a position of public authority. 
The Fatwa Committee of al-Azhar said, after mentioning the arguments based on the hadeeth: 
This ruling is based on this hadeeth, which is that the ruling that women should not be appointed to positions of public authority is not a ruling which is to be followed as a religious ritual without necessarily understanding the wisdom behind it, rather it is one of the rulings that are based on reasons which are obvious to those who understand the differences between the two types of human beings, men and women. This ruling is not connected to anything other than the femininity which is indicated by the word “woman” in the hadeeth. So femininity alone is the reason. … Because of her nature, woman is designed to fulfil the mission for which she was created, which is the role of mother and caring for and raising children. This means that she is likely to be affected by emotion. In addition to that she is faced with natural events that happen repeatedly over the months and years, which may weaken her strength and resolve in forming opinions and adhering to them and in fighting for them. This is something which women themselves cannot deny, and we do not need to quote examples and evidence to prove the emotional nature of woman throughout the ages. End quote. 
5 – The judge is required to be present among men’s gatherings and to mix with disputants and witnesses, and may need to be alone with them. Islam seeks to protect women and preserve their honour and dignity, and protect them from those who would toy with them. So Islam tells women to stay in their homes and not go out except in cases of necessity. And it forbids them from mixing with men and being alone with them, because that poses a threat to women and their honour. 
See: Wilaayat al-Mar’ah fi’l-Fiqh al-Islami (p. 217-250) – Master’s Thesis by Muhammad Anwar.