If you have a legitimate reason, writing an appeal letter to retake an exam can be very effective. College professors and middle/high school teachers are people who can be sympathetic to your situation.
If the letter is being sent as a hard copy, then it should be in the proper business format, otherwise, if the letter is being emailed, it should have an appropriate subject line and proper grammar.
My name is Howie Washington and I am a student in your Biology 201 class.
I did not perform up to my potential on the most recent exam on April 5 because of a family emergency. On April 2, my mom had a stroke and was hospitalized so I drove 4 hours back home to be with her and stayed with her until she was released on the evening of April 4. Unfortunately, this meant that I was unable to perform up to my potential on the April 5 exam. I have attached the hospital record in this email as proof of my situation. I would appreciate it if you gave me the opportunity to retake the exam. You can contact me by email with your decision.
Thank you for taking the time to consider my request.