Make sure you filed your returns:
If the IRS or state files a substitute return for you, they will assert you never filed a return and you may have to pay in Chapter 13.
Keep good financial records:
Failing to keep good financial records will give you problems in any bankruptcy case, and especially in a tax discharge case.
Call the tax agency and get a tax transcript.
Either you do this, or your attorney does this step. It's the only sure way to know the correct time to file. Note: you'll need a transcript for each year of income tax for which you owe money. And you'll need it for both federal and your state tax, if any.
Cooperate with the tax agency:
If you want to avoid enforced collections, cooperate. Give the IRS financial statements if they ask for them. It's form 433A for individuals and 433B for businesses. Both forms are available on the internet. Just Google "IRS Form 433-A" (or B). The form is fillable PDF and all you need is the free Acrobat reader.
Be prepared to weather the storm:
Sometimes the tax agency will be hostile, and will insist on levying your assets or garnishing your wages. Any attempts to hide assets or income will leave you open to attack for bad faith, damaging your chances of a tax discharge in bankruptcy.