Q: Is a Dayan allowed to judge a litigant with whom he is friendly, or with whom he is at odds?
A: The Shulchan Aruch rules that a Dayan may not judge a litigant who is his friend, even if not extremely close, or one with whom he is at odds, even if not his enemy. Although a friend may testify, this is because a witness reports objective evidence, whereas a Dayan must apply reasoning and is more likely to be unintentionally influenced in his thinking. Some allow the Dayan to judge if he is friendly with both parties (C.M. 7:7; Sma 33:1; Pischei Teshuvah 7:11; Aruch Hashulchan 7:14).
The Rema, however, rules that the Dayan may judge if he is not a very close friend or an enemy, although some refrain from judging any friend as a stringency. Furthermore, the litigant must bring evidence if he wants to disqualify a Dayan on the basis of friendship or enmity.
If the litigant willingly accepted the Dayan or willingly came before him, he certainly may rule (C.M. 22:1; Shach 7:15).