Absolutely. That's because different investment mixes are riskier than others, and your tolerance for risk decreases as you age.
Stocks - which are shares of ownership in a corporation - provide the most juice for long-term growth. But they're volatile, so they can lose you a lot of money in the short term. When you're young, the long-term growth potential of stocks outweighs the risks. When you're older, not so much. So you should scale back on the percentage of stocks in your portfolio over time.
Bonds - which are basically interest-bearing loans that you provide a company or government - give you weaker long-term returns than stocks do, but less volatility. So you should increase the percentage of your holdings in bonds over time.
Cash - or "cash equivalents," such as money-market funds - are the least risky of all. But they also have the lowest returns. You might not need cash in your retirement account at all until you're approaching retirement age or in retirement.