Giving judgement is not permissible for someone who has not been endowed by Allah with the qualities of inner purity, sincerity in both his hidden and visible actions, and a proof from his Lord in every state. This is because whoever has judged has decreed, and decree is only valid by the permission of Allah and by His proof. Whoever is liberal in his judgement, without having made a proper examination, is ignorant and will be taken to task for his ignorance and will be burdened with his judgement as the tradition indicates. Knowledge is a light, which Allah casts into the heart of whomsoever He wills.
The Holy Prophet said, 'Whoever is boldest among you in judging is also the most insolent to Allah'. Does not the judge know that he is the one who has come between Allah and His bondsmen, and that he is wavering between the Garden and the Fire? Sufyan ibn 'Uyaynah said, 'How can anyone else benefit from my knowledge if I have denied myself its benefit?' It is inappropriate for anyone to judge on what is permissible (halal) and what is forbidden (haram) among creation, except for one who causes the people of his time, his village, and his city to follow the truth through obedience to the Holy Prophet and who recognizes what is applicable of his judgement. The Holy Prophet said, 'It is because giving judgement is such a tremendous affair, in which there is no place for "hopefully", "perhaps" or "may be".
The Commander of the Faithful said to a judge, 'Do you know the difference between those verses of the Qur'an which abrogate and those which are abrogated?'
'Do you have a command of the intentions of Allah in the parables of the Qur'an?'
'Then you have perished and caused others to perish,' the Commander of the Faithful replied.
A judge needs to know the various meanings of the Qur'an, the truth of the Prophetic way, the inward indications, courtesies, consensus and disagreements, and to be familiar with the bases of what they agree upon and disagree about. Then he must have acute discrimination, sound action, wisdom, and precaution. If he has these things, then let him judge.