You can use this sample
Address it to The Honorable (name) with the proper address, etc
I am writing this letter on behalf of my son who is before you on criminal charge as well as a bond violation.
My son, Robbie has a great future ahead of him. He is scheduled to go into the Marines in August to serve his country. I believe this would be the best thing for him and certainly more beneficial to his becoming a responsible, productive citizen than any incarceration.
Robbie is currently in school and is a good student, obtaining A's and B's in many of his classes. His teachers always have good things to say about him and were very surprised when all of this came about.
I also was shocked and dismayed over his behavior as he has always been a good child. He has never disrespected me and has always been there for me to help in any way he could. This incident is very unlike Robbie's character. He has always made friends easily. He attends church with me (if he does) and has always wanted to go into the service to help protect and defend this country.
Your Honor, I am seeking the mercy of the Court when you decide what punishment my son should have for his behavior. I hope that you will reach deep within in making that decision and that you will see that this is not unusal behavior for my son and that you will be lienient, allowing him to move forward with his goals for a bright and promising future.
Thank you for your time and consideration.
Sign the letter. Feel free to add anything else that you might see as useful. Keep in mind, that the shorter and to the point is more effective than an overly done dramatic appeal
Best to you and your son with this matter.