Well, in a perfect world you'd put every single investment you had into a tax-advantaged plan, such as a 401(k) or an IRA. Unfortunately, there are limits on how much you can contribute to these plans. So once you max out your contributions to those plans each year, you'll wind up putting additional retirement money into regular investment accounts. And your decisions about which investments you put in each can have major tax consequences.
Your best strategy is simple. First, look at your retirement investments as a whole, including IRAs, 401(k)s and other investments that are in regular accounts. Then, put those investments that would normally rack up the most taxes into your tax-sheltered accounts, where you'll benefit the most from the tax advantages. Put those investments that rack up the lowest taxes into regular investment accounts. That way, you'll pay the lowest taxes overall.