The kinda letter you write depends on some factors like . . .
1) Have you already discussed this with your boss and the letter is just a formality or is the letter gonna be the first time your boss knows about your request?
2) How long will you be gone? If it's more than a day. . . - Who is gonna take over your responsibilities while you are gone? - Are you gonna make yourself available (via phone or email) to that person?
3) Is this an unpaid leave of absence?
Anyhoo, this is a very generic sample
Dear Mr./Ms. Last Name:
I would like to request a leave of absence from work on [insert date] to take a very important exam. I will return to work on [insert date]
Please let me know if I can provide any further information or if you have any questions.
Thank you very much for your consideration in providing me with this opportunity for personal leave.
Sincerely,
Your Name
Wait. . . Are you in Nigeria? If you are then thats a different ball game entirely.
The letter should go something like this. . .
Dear Mr./Ms. Last Name:
I want to use your father's head to beg you for a leave of absence from work in order to take an exam. I will return to work [insert date] and I will make sure i worker harder than a donkey to make up for the missed day.
Attached are copies of my receipt, the venue, time and the invigilator's name, address and phone. . . evidence that I am truly taking an exam and not trying to play hooky. If you need anything else like my right arm, I'm more than ready to provide it. . .anything to show how much I need this leave of absence.
May God/Allah bless you and your family as you consider my request.
Than you sir. May you continue to go forward and upwards in all your endeavors.
God Bless
Your name
PS
I wrote this letter on my knees