The short answer is, yes. The earlier you can start investing, the longer the money has to grow and compound.
If you can achieve an annualized return of just over 7% (which is not out of the realm of possibility over the long-term in a well-diversified, properly allocated portfolio), then your money will double roughly every 10 years or so. For example, if you put $10,000 aside at age 20, had an annualized 7.2% return, at age 60, it would be worth about $160,000. If you waited until age 30 to set aside that $10,000 and had the same return, at age 60, it would be worth about $80,000. So, you can see the power that time has when it comes to compounded and growth of your money.
So, I would say that you should start saving and investing as early as possible. Even if it is small amounts initially (say $50 or $100 a month) because over time, those small amounts can turn into large amounts. Additionally, it is important to establish the habit of saving so that when you start your career, have higher income, etc. you can start setting aside more.
I usually tell people to aim for at least 10% of their gross income set aside when they are first starting out and money may be tight with a lower income, student loans, etc. But as they grow in their career a bit, 15% is a better target, and in reality, I generally tell people to aim for 20%. If you can save 20% of your gross income for the better part of your career, it should put you on a path for a pretty solid retirement (no guarantee of course).
So my suggestion would be to do what you can to work saving/investing into your budget (I say saving as well because you want to establish an emergency fund of at least 3-6 months of living expenses that you keep in a savings account for quick access and to not expose it to the uncertainties of the markets) as early as possible. Obviously, you want to make sure you make your payments on your student loans on time, keep a roof over your head, food on the table, etc. But I highly recommend working some saving/investing into the budget - it may not mean having quite as much fun or going out to eat as much, but in the long-run, you will likely be much better off.
Best of luck.
WalletHub Answers is a free service that helps consumers access financial information. Information on WalletHub Answers is provided “as is” and should not be considered financial, legal or investment advice. WalletHub is not a financial advisor, law firm, “lawyer referral service,” or a substitute for a financial advisor, attorney, or law firm. You may want to hire a professional before making any decision. WalletHub does not endorse any particular contributors and cannot guarantee the quality or reliability of any information posted. The helpfulness of a financial advisor's answer is not indicative of future advisor performance.