You are not required to have an attorney to file for bankruptcy. In some simple Chapter 7 cases, you can file on your own (it's called filing "pro se," meaning that you represent yourself) if you are willing to put in some time and research. However, in many cases, it's a good idea to have a bankruptcy attorney.
The importance of an attorney depends on the complexity of your case and whether you are filing a Chapter 7 or Chapter 13 bankruptcy.
The general rule is the simpler your bankruptcy, the better your chances are to complete it and receive a discharge on your own. So it’s usually more feasible to file without an attorney if you are filing a simple Chapter 7 bankruptcy.
Thus, if you have a complicated bankruptcy situation, it is highly recommended that you seek out a bankruptcy attorney to assist you in your case!