Nonresident aliens who pass the green card test or the substantial presence test can be treated as resident aliens for tax purposes—they file Form 1040.
Nonresident Aliens who do not Pass the Tests
Refer unmarried nonresident aliens who do not meet the green card or substantial presence test to a professional tax preparer to file Form 1040NR or Form 1040NR-EZ.
You can provide assistance to U.S. citizens and resident aliens who have a spouse that does not qualify to be treated as a resident alien using the green card or substantial presence test.
There are options for nonresident aliens who are married to U.S. citizens or residents; depending on filing status and other factors, a citizen/resident may be able to claim a personal exemption for the nonresident spouse.
For more information, see Publication 17, Filing Status.