You may choose this status if any of the following is true:
You were married as of December 31, even if you did not live with your spouse at the end of the tax year, or
Your spouse died in the tax year and you did not remarry in the tax year, or
Your spouse died in the current year before filing a tax year return.
You can choose married filing jointly as your filing status if you are considered married and both you and your spouse agree to file a joint return. On a joint return, you and your spouse report your combined income and deduct your combined allowable expenses. You can file a joint return even if one of you had no income or deductions.
Joint and Several Tax Liability
If you file a joint return, both you and your spouse are generally responsible for the tax and any interest or penalties due on the return. This means that if one spouse does not pay the tax due, the other may have to. However, see Innocent Spouse Relief on Page 90 of Form 1040 instructions.
Nonresident Aliens and Dual-Status Aliens
Generally a husband and wife cannot file a joint return if either spouse is a nonresident alien at any time during the year. However, if you were a nonresident alien or a dual-status alien and were married to a US citizen or resident alien at the end of the tax year, you may elect to be treated as a resident alien and file a joint return. See Pub. 519 for details.
Also see U.S. Citizens and Resident Aliens Abroad - Nonresident Alien Spouse