This depends on where you live, which manufacturer you're dealing with, and whether your dealership is helpful.
Lawyers with experience in this area will know the ins and outs of dealing with different car makers. In some states, your attorney's fees will be paid for your if you win. Whatever you do, save all your records and your receipts, because the burden will be on you to prove that you made the proper attempts to have the car repair and that you complied with all relevant time limits.
Also, if you car has a condition that deprives you of some important aspect of its use, value or your safety, then you might have a claim. Often, if you have made four or more repair attempts on the same part without any luck, you'll qualify in most cases.