The Cow - 2:213
Mankind were a single community. Allah sent messengers as bearers of glad tidings and warners and sent down with them the Book containing the truth so that they might judge between the people in matters wherein they differed. But those who were given the Book disputed about it out of envy among themselves after clear proofs had come to them. But Allah, by His permission, brought the believers to the truth about which they differed. Allah guides whom He wills/whosoever He wills.
When making a judgment:
The Women/4:135
Believers! Bear witness for the sake of Allah and observe justice, even against yourselves and your parents and your relatives. Whether rich or poor, Allah takes care of both groups. So do not be biased in accordance with your personal interests and feelings. If you distort the truth, or if you refrain from testifying, know that Allah is aware of what you do.
The Table Spread/5:8
Believers! Bear witness for Allah with justice. Let not your hatred against a people prevent you from acting justly. It is more virtuous to act justly. Listen to Allah. Allah is aware of what you do.
The Table Spread/5:42
They listen to falsehood and eat illegally. If they come to you, judge between them or turn away. If you turn away from them, they can do you no harm. If you judge, judge between them with justice. Allah loves the just.
The Table Spread/5:44
We sent down the Torah in which is guidance and light, and the Muslim prophets used to judge between the Jews by it. And the rabbis and the scribes used to judge by what they were commanded from the Book of Allah, and they were witnesses over it. Do not honor the people, honor Me, and do not sell My verses at a cheap price. Those who do not judge by what Allah has revealed are disbelievers.