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.
Familiarize yourself with the position. Get a copy of the job description, if you can, and talk to the person you will recommend. If you know the intended recipient of the letter, ask them about the position as well. The more you know about the position, the better you will be able to tailor your letter to suit the needs of both parties.