Generally, anyone can file for bankruptcy. As long as you are an honest person who simply cannot afford to pay your bills, you can qualify for bankruptcy, either Chapter 7 or Chapter 13. If you have filed in the past, it could affect the options that may be available to you. For instance, if you have previously filed for a Chapter 7 bankruptcy, you cannot file another Chapter 7 for eight years.
Bankruptcy is for the honest debtor who has too much debt and no real way to repay it. So, you will not be allowed to file for bankruptcy to defraud creditors. For example, if you know you are in financial trouble, you cannot purposefully run up large credit card debts just to file bankruptcy in the end.
There are documentation requirements. You will need to produce personal tax returns, proof of income for six months prior to filing, and a certificate showing that you took a mandatory credit counseling class.