The importance aspect of asking is not when, but who. If you can get two very good letters written for you after your sophomore year, ask them to write them. It is very important that the letter writer convey that they know more about you than what grade you got in their class or the name of your research project. Letters that describe favorable aspects of your personality/humor/demeanor/aptitude/etc are the best letters. If you feel those two professors can write a letter of this kind, ask them at a time when it provides them with ample time.
I had two letters written by professors who taught lower division classes and asked them for them right before entering my junior year (physiology and organic chem professors). Then, I had two letters from upper division professors written for me by the end of my last semester as a senior. That way, any awards or honors can be included into your letter and you will also most likely have gotten to know these people better (visiting them in their office, emails, etc).
I wound up with five letters (physiology professor, organic chem professor , department chair who was also my research mentor, a MDPhD who taught a medical nutrition therapy class in my department, and a physician who was in charge of a clinical research study where I volunteered on a consistent basis long enough to form very good relations with the research team.
I suggest providing your letter writers with some sort of personal statement and a copy of your resume/CV. I'd also meet with them to just talk (if they are willing). That way they will have a good idea of what you do outside of academia. Letters are crucial in the admissions process. Letters that speak only of your grades are useless. That is what a transcript is for. Just keep these things in mind as you think about who to ask for letters. Sorry this turned into an advice column..but when I was going around thinking about who to ask I had a friend who reassurred me to keep these things in mind. I wish you the best of luck. It is a very good sign that you are a sophomore and already thinking about getting good letters. Good luck.