If the job you accept involves a number of agreements such as salary, health benefits, a 401(k) plan, stock options, annual raises, vacation days, work hours, and travel, then your acceptance letter can confirm those things and ensure that you and your employer have a mutual understanding about your terms of employment. Subjects discussed in interviews and settled through verbal agreements can often be forgotten or misinterpreted, so you should clarify things now. Keep a copy of your acceptance letter.
The format for these letters is less rigid (since you already have the job, unless your send in some chicken scratch written on construction paper with crayon, you'll probably be fine), but you obviously want to start you new job on the best note possible. Here's a basic format that makes writing acceptance letters easy and effective:
First paragraph. Time for pleasantries. First, formally (and with great pleasure) accept the job you've been offered, making sure to list the exact title of the job you've been given. Tell them how much you enjoyed coming in and meeting them at the interview and how you're looking forward to working with them and the company.
Middle paragraph(s). Here's where you outline exactly what job you understand you're accepting. The type of work you'll be doing and the compensation you'll be given should be restated here to ensure an understanding between you and your employer. Try to avoid scary lawyer-ese prose; you don't want to spook your new boss with this letter. It shouldn't read like a legal contract, after all, but an assurance of mutual understanding.
Last paragraph. Time to give thanks to the people who made your employment possible. No, not your mom, and not "the little people." The people you want to thank are the people who gave you the offer: your employers. Then, tell them what day and time you will see them next: a polite way to confirm your starting date.
Congratulations: you've successfully navigated the resume, cover letter, and interview minefield, and you've won the job you've been gunning for. But there's one last step before you show up on your first day with your box of Dilbert desk thingamajigs: the job acceptance letter.