You have a number of remedies but it is important that you make an immediate formal complaint to the Contractor State Licensing Board. The CSLB holds the contractor's license in its hand and that is often an effective hammer for compelling redress of poor performance and restitution. There is also a contractor's bond and CSLB can give you instructions for successfully making a claim.
You also can bring a civil action. A number of civil litigators will likely offer you advice and consultations in responsive postings here.
My responses to questions on Avvo are never intended as legal advice and must not be relied upon as legal advice. I give legal advice only in the course of an attorney-client relationship. Exchange of information through Avvo's Questions forum does not establish an attorney-client relationship with me. That relationship is established only by individual consultation and execution of a written agreement for legal services.
My colleague has provided excellent advice. Realize that unlicensed contractors in CA are not even entitled to charge for their illegal contracting work. But licensed contractors can and often do have unlicensed employees working for them, and as long as the unlicensed workers are working under the licensed individual's license, that's allowed.
The state board site, www.CSLB.ca.gov, is a great source of help, since they can suspend a contractor's license until they pay judgments.
But note as my colleague notes, a claim against the contractor's bond is available, but the time in which to file a claim is very short, and it sounds like you've waited quite a while to address these issues, so you need to act quickly. That means hiring a lawyer if you don't feel comfortable handling this yourself.
Avvo doesn't pay us for these responses, and I'm not your lawyer just because I answer this question or respond to any follow-up comments. If you want to hire me, please contact me. Otherwise, please don't expect a further response. We need an actual written agreement to form an attorney-client relationship. I'm only licensed in CA and you shouldn't rely on this answer, since each state has different laws, each situation is fact specific, and it's impossible to evaluate a legal problem without a comprehensive consultation and review of all the facts and documents at issue.
In addition to the good advice from the other attorneys, you should also contact the insurance company that was paying for the work and let them know about this. It sounds like you had some sort of plumbing or flooding problem, and in those cases, the insurance company often sends out remediation companies to perform the work. If so, the insurance company would have a lot of power over these guys, since they work hand in hand. Good luck.
All good advice above. In addition, check your agreement with the contractor. If It is a standard general contractors agreement there are provisions regarding "cure" (giving a right in certain circumstances to allow the contractor time to correct and others when you can pursue other options) and also the dispute resolution choices (i.e. arbitration or mediation). Often times in a situation like yours where you have good written and photographic evidence, you may opt for binding arbitration (which is a mini trial with finality, no appeals) and this may be more cost-effective than commencing litigation. A arbitrators award is confirmed as a judgment and loaded with this you can make claim on the bond as well as report the judgment to the CSLB that will suspend the contractor till you are paid. There are many advantages to this strategy. As above be wary of contract provisions that you must comply with and if you are unsure contact a qualified attorney.