Prenuptial agreements are basically just a contract between you and your spouse and you can write pretty much anything into them, as long as it's not illegal. So, whether a prenuptial agreement has any effect on your taxes depends on what the prenup says. A written agreement about who keeps the house in the divorce or who pays the utilities won't prevent you from filing together. However, if the agreement states that your finances should be kept separate, that's another matter.
If your prenuptial agreement includes writing stating that the finances of you and your spouse should be kept seperate, it is in your best interest to file taxes separately.
Write What You Like in a Prenup
Your prenuptial agreement can set any financial terms that you and your spouse agree on: that you keep your assets separate, even though you live in a community property state; that you aren't responsible for each other's premarital debts; or who gets what in a divorce. The only things you can't include are decisions regarding child support or child custody in the event of a divorce, or anything that actually encourages a divorce. Some agreements would have no effect on your tax filing status, but filing jointly would contradict an agreement to keep your married finances separate. If the prenup specifically states that you'll file separately, that would rule out a joint return.
File Jointly if the Prenup Allows
Filing a joint tax return usually gives you a smaller tax payment than filing separately. Even if your assets are separate in all other ways, your tax return will unite them as far as the government is concerned. This comes with certain risks attached. If the Internal Revenue Service can't collect from a spouse or a spouse under-reports income or commits tax fraud, the agency can legally demand that the other spouse pays. If the prenup states that you're not responsible for your spouse's debts, that might keep the IRS from coming after you. However, the courts have varied on their opinion in this matter. It's safest to assume that tax law will trump the provisions of your prenup in this situation.
Courts will Scrutinize for Fairness
Judges used to ignore prenuptial agreements on the grounds they were inherently unfair to the poorer spouse. Although prenups are more acceptable now, a judge may still scrutinize yours carefully for signs that it isn't isn't fair or valid. Even if you and your spouse believe that filing jointly doesn't violate the "separate finances" condition of your agreement, a divorce judge might interpret that as a sign you didn't follow the agreement and that it's therefore invalid. This could cause serious problems for one or both spouses down the line.
Review your Prenup Regularly
It's a good idea to review your prenuptial agreement every few years or so to consider whether it needs updating. If you're no longer concerned about protection from your spouse's debts or you're now comfortable mingling finances, you can rewrite it to change the terms. You could also change the terms if you decide the financial gains of joint filing are too good to pass up. You can even tear up the agreement, but if you might regret that if you divorce later.