Keep the letter simple.
You don't have to explain yourself to anyone.
A letter of resignation can be as simple as one or two lines.
"To whom it may concern:
This letter is to formally document my resignation on July 6th, 2005, two weeks from today's date.
Thank you,
Robert G. Hossenfeffer"
Put it in an envelope, tuck the flap in... don't seal it... so if whoever you talk to needs to see the formal letter it's not a production to open it.
Ask to meet with whoever it is you need to tell about this, tell them you would like to put in your two weeks notice.
No more is required.
If you want to be chummy and tell what you are leaving for or thank them for a great working experience, go for it. But it's not necessary. Also, if you plan on really doing this, stick to it. Don't let them try to pursuade you with a bigger paycheck or something... because you'll be their bitch for the rest of your employment.
Whatever you do, don't tell them off or make any comment that could be taken negatively. They could end up calling you a year from now with an offer you want.