If you believe the nature of the relationship is such that the Judge cannot be impartial, you can seek to have the case transferred to a different judge. Just knowing someone, without more, doesn't mean the judge can't be impartial, however.
Disclaimer: This answer is provided as a public service and as a general response to a general question, it is not meant, and should not be relied upon as specific legal advice, nor does it create an attorney-client relationship.