Hi littlehelpplease,
The legal profession is a fairly tight and small group of people. Lawyers practicing in family law, for instance, would have come across fellow family law lawyers and judges, in professional and social situations. This is just a fact of life. As such, it is not possible to find a lawyer who has no relationship, whether professional or social, with the judge. For this reason, knowing the judge is not a conflict of interest in itself according to the solicitor's guide and law society.
If, however, the lawyer is best friends with the presiding judge, or the judge is the lawyer's family relation, then there may be grounds to dispute the appointment based on conflict of interest. However, note that in considering whether there is a conflict, the law society will balance this with the fundamental right of the client to choose their own legal representative.
Lawyers owe a fiduciary duty to their client to act in the client's best interests, so far as it does not conflict with their duty to the court. As such, having a relationship with the judge (unless the judge is the lawyer's spouse or close family relation) in itself, will not necessarily jeopardise the clients/other side. Legal professionals know how to act professionally, and if they do not, there are heavy legal, professional and reputational consequences.
However, if you still believe there is some conflict of interest at play that will likely adversely affect your case, you can complain to the Law Society.