You can't - legally.
A private communication between you and the judge would be an 'ex parte communication', which he is required by law to ignore.
If your ex has legal custody then he has the right to decide where he wants her to live. If that is with you... great.
If he sends her home, have him write a letter saying that he wants her to live with you, and sign it. Then you can file a motion with the court asking them to make that official.
Richard