If you are asking a professor for a letter, it is best to ask them after you have finished taking their class. Ask them the following quarter or semester. You want to make sure that your professor remembers you when he or she writes your letter. If you took the class much earlier than the year you were planning to apply, you can store the letter using a letter service. Most schools provide letter services that store your letters so that you can use them whenever you need to. Another good letter service is Interfolio.