The failure to file 2007 taxes does not preclude bankruptcy relief. However, you are required to be law-abiding, and the law requires you to file tax returns with certain limited exceptions for very low-income people, and even then the IRS sometimes wants you to prove you were low income.
If it subsequently turns out you are entitled to a refund for 2007, well, first, you might be beyond the statute of limitation to get one, and second, it may become property of your bankruptcy estate. And if it turns out you owe, well, that wouldn’t have been discharged anyway.
My office policy is that I won’t file your bankruptcy if you’re not current on taxes, but depending on the circumstances, we can make exceptions on rare occasions (for instance, depending on whether you have nominal income, and/or whether you have had a history of disputes and extensive obligations to the IRS). There is a very slight chance that the failure to file taxes six years ago could disrupt your bankruptcy or that the filing of the bankruptcy could cause other unforeseen problems due to this. However, it is probably such an ancient misgiving, that it’s water under the dam at this time, and you should be eligible for bankruptcy relief. In a chapter 7 or 13, the trustee must have your last year’s tax returns, and in a chapter 13, they need to verify that you have filed for the last four years in order to confirm your plan. If there are unfiled tax returns, probably the worst thing that might happen is that you could be required to do it after filing, as a condition of getting a chapter 7 discharge, or a chapter 13 plan confirmed.