Per the IRS Individuals Living or Working in U.S. Territories/Possessions webpage:
An individual who has income from American Samoa, the Commonwealth of the Northern Mariana Islands (CNMI), Guam, Puerto Rico or the U.S. Virgin Islands will usually have to file a tax return with the tax department of one of these territories. In some situations, you may have to determine if you are a resident or a nonresident of the territory. For forms and advice on filing a territory tax return, contact that territory's tax department. The addresses and telephone numbers for the tax departments of the U.S. territories may be found in Publication 570, Tax Guide for Individuals With Income From U.S. Possessions. Additional information about the U.S. territories can be found at State and Local Government on the Net.
If you have income from one of these U.S. territories, you may have to file a U.S. tax return only, a territory tax return only, or both returns. This generally depends on whether you are considered a bona fide resident of one of the U.S. territories. In some cases, you may have to file a U.S. return, but be able to exclude income earned in a territory from U.S. tax. Filing requirements for specific U.S. territories are explained in Publication 570, Tax Guide for Individuals With Income From U.S. Possessions.
Note that any link in the information above is updated each year automatically and will take you to the most recent version of the webpage or document at the time it is accessed.