You will want to make yourself well known to your potential referee so that they can provide as detailed a letter as possible. Try to pick smaller, more recent courses where you interacted regularly with the professor or course instructor. Lab sessions or seminar classes are ideal, because they allow you ample time for face-to-face interactions with the course instructor.
A crucial part of securing references, once you identified your referees, is to ask them specifically if they could write “a strong reference letter” for you. They will have to tell you if they cannot write a strong letter (for whatever reason), and if this is the case then you are far better off to move on and pick a different referee.
Contacting your referees
It is important to identify these potential referees well in advance of applying to graduate programs.
It is also important to give your referees a due date for their letter.Two weeks before the overall due date would be ideal, but be prepared to be flexible in case they are busy or have multiple reference letters due at the same time.
If you’re a mature student or returning to school after a long absence you should make an effort to re-acquaint yourself with previous course instructors. Be sure to re-establish contact early on and keep up a steady correspondence to remind them who you are. If possible, try to send them any copies of assignments/tests they have marked to jog their memory.
Try to re-establish contact with your former department/program. They will have records of your attendance and staff may be able to help you re-establish contact with former professors, especially if they have retired or are no longer working in the same department.