Inform yourself about the person you are recommending. Spend some time talking to them about their goals and the position they are applying for. Gather together their current resume, any memos or notes you may have on them, and any other information that will help you as you write the letter. The best recommendations are thorough and specific, and having all the information at hand will make the process much easier.
How can I go about getting good letters of recommendation? Since your best letters will come from those who know you well, make an effort to get to know your professors and/or supervisors. A few ways you can do this are to speak up in class, select courses with small class sizes, take more than one class from a professor, do research for a professor, take on optional projects, and regularly attend office hours. The best strategy you can use to get a good letter of recommendation, particularly if a professor hasn’t known you long, is to provide your letter writer with ample information about you. This way, you will get a letter that includes concrete details about you, instead of a letter that contains only your grade, which is of limited value.