If you're applying this cycle, you should ask ASAP because it's generally polite to give your professors at least three weeks to write a letter and you'll want the letters to be ready by July. Ordinarily, you want to ask soon after you take a class with that professor so they won't forget about you.