At minimum, a character reference addressed to a judge should provide the name of the defendant or petitioner whom the reference letter is about, the nature of the legal decision the judge must decide, a requested outcome, and a reason why the judge should grant that desired outcome. This information can help identify the case if the letter's writer does not have the case number.
Someone writing a character reference letter to a judge should explain his relationship with the defendant or petitioner. This relationship could be a lifelong friend, coworker, religious leader or family member.
A character reference letter should be positive, personal, and proactive. Pay special attention to anything complimentary that can be said about the defendant or petitioner. If the individual took care of a dying relative for two years, that would be something positive to tell the judge about, because it reflects well on the person's character.
Remind the judge that the defendant or petitioner is indeed a person, not just a case to be decided. If this person is a devoted parent, share a story or two providing evidence of that fact. If the person served with distinction in the military, mention commendations received. Mention anything that sets the person apart as a unique and loved individual.