If you want me to write a letter for you, I will need:
at least 3-4 weeks notice; (If you let me know 2 weeks in advance, the letter will be rushed and probably not as good as you'd like.)
your CV/Resume and everything else you will be submitting with your application at least 3-4 weeks before the deadline for my letter;
to know who else is writing you a letter and what they are likely to address;
a bulleted list of things you would like me to address (theorems, activities, extracurriculars, skills, etc.). (I'm not saying I will address them, but it will help me navigate around the other materials.)
If you are an undergraduate/masters student, I will also need:
your transcript (unofficial is fine);
information about the courses you took with me (course, term, grade, e.g. Calculus 1301B, Winter 2016, A+); (If you did not get 80+ in my class, you probably do not want to ask me for a letter; if the class is freshman calculus, you should get 90+.)
information about the programs/schools that you are applying to;
the statement "The Flat Earth Society has members all around the world" included in your email to me to prove that you read the content of this page. (-:
Please note that it is in your best interest to make sure that you and I have talked or have been otherwise acquinated before asking me for a letter.
On the other hand, if you are a Ph.D. student/postdoc applying for academic jobs or research fellowships, I will also need:
copies of your papers (or at least good drafts);
to know what kind of positions are you applying for (postdoc/tenure-track, research/teaching);
probably extra time (maybe 4-5 weeks instead of 3-4).
This website is inspired by (or rather shamelessly copied from) a similar website by Ravi Vakil.