Section 109 of the bankruptcy code delineates who may or may not be a debtor. In detail, this section provides that a person may be a Chapter 7 debtor unless they are a railroad or a certain financial institution. Nowhere in the section is there a requirement that a debtor be a US Citizen. This means that any properly, legally admitted immigrant to the United States can file bankruptcy.
This doesn't mean that they must not meet the same requirements as other debtors, in particular providing and furnishing to the court properly issued Individual Taxpayer-Identification Numbers (ITIN). Bankruptcy Rule 1007(f) requires debtors to file a form with their petition called a Statement of Social Security Number. The rule also allows ITINs to be used in lieu of a social security number. An ITIN is a number issued by the Internal Revenue Service for tax-processing purposes. These numbers are similar in nature to social security numbers and are issued to individuals who must pay taxes but are not eligible for one reason or another.
These numbers are issued regardless of immigration status. Thus, if you have identification issued by a foreign government and are not a legal resident, it is highly likely that you do not have a social security number but instead an ITIN. These are perfectly acceptable in a bankruptcy filing. Of course, contacting your bankruptcy attorney regarding these matters ensures a smooth bankruptcy process.