Begin the letter by addressing it to the appropriate person. A letter that begins "Dear State University Admissions Committee" or "Dear Hiring Manager" is read as more thoughtful than "To Whom It May Concern. Meet with the student in advance of writing the letter to ask who to address the letter to, if necessary.
Open the letter by mentioning who the letter of reference is for and how long you have known the student. Include in what capacity you know the student, including which courses the student took from you and whether you served as a faculty adviser for any organizations the student has been involved with.
Describe the student's strengths. Include concrete examples from your experience teaching them. The more specific you can be about the student, the stronger the letter of reference will be.
State how well you think the student will perform at the university he is applying to or in the job or internship he seeks. If there is something about the student that makes them especially prepared, or an asset they will bring, mention it. Include your assessment of how they rank among their peers.
Print the letter on your departmental or school letterhead.
Sign and mail the letter. Be sure to get the information about where to send the letter from the student. Some letters of reference or recommendation for law or medical school are submitted electronically.