Getting a good recommendation letter can significantly help you in the application process so it's important to ask someone who you are in good terms with for a letter. It is also important to ask someone that knows you well for a recommendation and that you ask them for it in person. If you are seeking a letter for college or graduate schools, it is recommended that you request letters from your teachers/professors. If you are seeking a letter for a job, business or professional school then it would be ideal if you got one from your current company. If you have not been at your current company long or if you are not currently employed then asking a previous employer is recommended. If that is not possible seek recommendations from respected professionals that you may know, such as doctors, lawyers, politicians, ministers and so on.
Ask for the letters early on, don't wait until the day before the letter is supposed to be sent in to request the letters of recommendation. Instead ask ahead of time. If you are going to apply to school ask your professor at least a month ahead of time. If you are seeking a professional letter, ask for a letter of recommendation whenever you leave a job.
Assist the writer with as much material as necessary, providing the writer with your resume and a list of achievments will make it easier on the writer. You may also want to give him/her any information that will help with the letter including your plans for the future, your strengths, experiences and other qualities you want to be presented in the letter. Be honest about the information you give, if you embellish it'll catch up with you later.
You should provide the writer with a stamped and addressed envelope. Also if there is a guideline that needs to be followed or any other material that needs to be filled out, you should provide that to him/her.
After the letter is sent out, you should send a thank you note to the writer. You can also thank them in person or over the phone as well.