When writing a letter of reference to the court, you must tailor it the circumstance. A letter written recommending someone be awarded custody of his child would include specific instances where his skill as a parent was witnessed. A letter written for someone facing a drunken driving charge would focus more on the fact that it was a singular incident and vouching for the upstanding character of the person involved. Some things, however, are an integral part of writing any type of good reference letter to the courts.
Address the judge appropriately on the envelope. Methods of salutation vary depending on the court; address a circuit court judge as "His Honor Judge Smith" or "Her Honor Judge Smith" and a district court judge as "District Judge Smith." In the body of the letter, it is appropriate to use "Dear Judge Smith." Verify that you are spelling the name of the judge correctly; this will be his first impression of you.
Identify for whom you are sending the reference and for what reason in the first sentence. For example, "I am writing to you in regards to Sally Jones who is appearing before you on a shoplifting charge."
State whether you are writing this letter of reference with, or without, the person's knowledge in the second paragraph. Give your reason for wishing to provide a reference for this person; for example, "I have known Sally for 15 years and this is the first time she has ever gotten into any type of trouble. She did not ask me to write this letter but I feel strongly about her receiving a second chance and hope to convince you to feel the same way."
Let the judge know a little bit about the person in the third paragraph. For instance, "Sally is a person who places a great deal of value on honesty. Under the circumstances, I can understand this would be difficult to believe, but she has been through a great deal of stress in the last six months. Her marriage dissolved and she was laid off from her job. She has been struggling to pay her bills and feed her three small children. Desperation drove her to steal the loaf of bread and the peanut butter from the grocery store."
Take the last paragraph to impress upon the judge that you would vouch for this person and their remorse for the act and what you are actually requesting. For example, "Sally knows she made a mistake and that she should have swallowed her pride and went to a food pantry for help instead. I do not believe she would ever shoplift again and though I realize she cannot go unpunished for her crime I would request she be given community service rather than a fine she cannot afford to pay or jail time which would leave her children without their mother."
Thank the judge for taking the time to read your letter in closing. Sign the letter and include your contact information at the bottom in case she wishes to contact you.