Filing separate tax returns doesn't require living separate lives. Once you're married, you and your spouse can file separate tax returns whether you're together or apart. If for any reason you and your spouse decide it's to your benefit to file separate returns, you're free to do so. You're also free to switch back to joint returns at any point.
Your marital status on December 31 is usually all that counts in deciding whether you file as a single or married person. If you tie the knot on the last day of the year, you're married for the entire tax year; if you divorce December 31, you're single for the year. If your spouse dies during the year, you can still file a joint return for the tax year in which he died. A legal separation agreement would actually disqualify you from filing separate marital returns, as the IRS would typically consider you single or head of household, depending on your particular circumstances.
When you and your spouse can't agree whether to file a joint return, you have to file separate returns: joint filing requires you both be on the same page. Normally you have to file separately if your spouse is unable to sign -- for example because she's away on business. The IRS allows some exceptions such as when your spouse is ill, mentally incompetent or away in a combat zone.
Usually filing a joint return brings a lower tax rate than filing separately. There are added disadvantages to filing separately, including lower deductions for capital losses and loss of vairous tax credits, such as the child-care and earned income tax credits. Filing separately is an advantage in some circumstances. You can only deduct medical expenses greater than 7.5 percent of your adjusted gross income, for instance. If you file a joint return and you both have taxable income, 7.5 percent of your personal AGI is smaller than if you combine incomes.
If you file separately and then decide a joint return would have worked better, you have up to three years to amend your return by filing a 1040X form. It doesn't work the other way around, however: Once you file a joint return, you can't refile separately. If your marriage is ever annulled, your tax status for your married years becomes retroactively single. You have to file a 1040X to fix any returns from the previous three years -- after that, the statute of limitations protects you.