Tenants have many options to get their landlord to make repairs or to fix problems that make their rental unit unsafe or healthy. Whether or not a lawsuit makes sense depends on several factors, including where you live (state rules vary), the seriousness of the problem, and whether you've jumped through the hoops your state requires before filing a lawsuit.
Here's an overview of the basics. To get a definitive advice on your situation, or to hire representation, you'll want to consult an attorney. One place to start your search for an experienced landlord-tenant lawyer is Nolo's Lawyer Directory.
There are several steps you can take before hiring a lawyer that may eliminate the need to sue your landlord in court.
In every state but Arkansas (which does not recognize the implied warranty of habitability on the state level), you can sue your landlord for an uninhabitable rental unit. And you can do this whether or not you move out. (But staying only makes sense if it's safe to do so—something that wouldn't be the case if your roof has major leaks in studio apartment and it's the rainy season where you live.)
Small claims court is easiest and fastest way to sue your landlord. (See Nolo's 50 State Overview of Small Claims Rules for the basics in your state (including the dollar limit of lawsuits and whether or not you are allowed to have an attorney represent you in your state's court); also, follow our advice on filing a security deposit lawsuit as to preparing for and presenting your case against the landlord. Before filing suit, write your landlord a demand letter stating what you want and your intent to sue if necessary.
Depending on the laws in your state, you may sue the landlord for the losses associated with the uninhabitable rental premises. These could include damaged bedding and furniture in a bedroom with a leaky roof, and/or the difference between your monthly rent and the value of the rental unit with the habitability problem, times the number of months you've lived with the substandard condition. Depending on the defect, you may also be able to sue your landlord for personal injuries, including pain and suffering, caused by the defective housing conditions.
Keep in mind that suing isn't risk-free, especially if you are a month-to-month tenant or near the end of your lease and you want to stay. Your angry landlord may simply decide to terminate your rental agreement or not renew your lease. If you are covered by a state anti-retaliation law (prohibiting landlords from evicting you for exercising a legal right such as suing for habitability problems), you will have some protection, but to assert your rights you'll have to bring another lawsuit.
If you are confident about successfully suing your landlord for a habitability problem, and your lease or rental agreement entitles you to attorney fees if you win in court, a lawyer's help will be crucial. The Working with a Lawyer section of the Nolo website includes dozens of useful articles, including How to Find an Excellent Lawyer and the basics of attorney fees.
For more advice on your rights to repairs and maintenance, see the Nolo books Every Tenant's Legal Guide (or California Tenants' Rights, if you're in California).
Need a lawyer? Start here.