A letter of recommendation is probably the single most important thing in your application packet. This letter tells the person, who is going to decide whether you are eligible for admission or if you are really worthy of the position. Hence, it is necessary that this letter should reflect the best of your abilities and give a thorough picture of your accomplishments without much ado. It should be succinct, because the selectors do not have much time to go on reading lengthy recommendation letters from so many applicants.
A letter of recommendation is required in many scenarios. The most common scenario many know about is during employment changes. This letter tells the selector about the character and the professional demeanor of the applicant. This letter should best be taken from an immediate superior. This is so because you have worked with him very closely and he knows you well enough to recommend you. The designation of the recommender does not matter as much as your direct relation with him/her.
Another place where it might be required is during an application for admission in a graduate school, i.e., in an academic scenario. This type of letter informs the reader about the overall behavior of the applicant throughout his education in any particular school. This letter should be taken from those teachers, who have taught you directly or those with whom you have done any practical or project work. This letter mainly focuses on the academic achievements of the applicant.
Another common use of letter of recommendation is in the form a character letter. This letter vouches for the character of the applicant. This type of letter has got variety of uses and is considered in a high regard at many places. This letter has to be obtained from a close friend or relative, who knows you pretty well. This type of letter can be used as an augmentation with your employment letter. It can be generally used for your first job, when you don't have any previous employment experience, and hence recommendation.
A letter of recommendation should have an introduction, the main body and a conclusion. An old adage tells you how to do it in a better way - "Tell them what you are going to tell them, tell them it, and then tell them what you have told them". Although, this adage explains how to write a good essay, it goes the same way for a letter of recommendation too.
Some tips for writing a letter of recommendation:
Here is a template of a letter of recommendation, which will help you write a good one:
[Address (preferably office address)]
Subject: Letter of recommendation for XYZ
To whomsoever it may concern,
1st paragraph [This should contain introduction about the person you are recommending. It should also contain your relation with that person. It should be concise]
2nd / 3rd paragraph [Here you need to elaborate the specific qualities of the recommended person. You should explain in detail how the person is suitable for the particular position and also how he has excelled in your institution/during his normal conduct (in case of character recommendation letter)]
Last paragraph [This paragraph is a concluding one, where you need to summarize whatever you have told in the letter. You can add some more points here if required]
[Your name] Read more about how to write a letter of recommendation here.