The landlord can only use your deposit for damages over and above normal wear and tear. What normal wear and tear is can be a subjective issue. However, dirty carpet is normal - stained, pet soiled, ripped, etc. carpet is not. Also, the landlord is required to have a walk-through with you and discuss any problems, repairs, etc. If he didn't do this, he may have waived his right to keep any of your money. You likely have a claim against the landlord in small claims court for your deposit.
As a tenant, you have a right to have all equipment working properly, and if it is not, you have a right to withhold rent until the unit gets fixed. If you have incurred these costs (expensive utility bills) because of the landlords failure to make necessary repairs, you can sue to recover part of that as well.
The judge may only award you a portion, but if you're going to sue for the security deposit, you might as well add this to the claim.
DISCLAIMER: Answers from Experts on JustAnswer are not substitutes for the advice of an attorney. JustAnswer is a public forum and questions and responses are not private or confidential or protected by the attorney-client privilege. The Expert above is not your attorney, and the response above is not legal advice. You should not read this response to propose specific action or address specific circumstances, but only to give you a sense of general principles of law that might affect the situation you describe. Application of these general principles to particular circumstances must be done by a lawyer who has spoken with you in confidence, learned all relevant information, and explored various options. Before acting on these general principles, you should hire a lawyer licensed to practice law in the jurisdiction to which your question pertains.
The responses above are from individual Experts, not JustAnswer. The site and services are provided “as is”. To view the verified credential of an Expert, click on the “Verified” symbol in the Expert’s profile. This site is not for emergency questions which should be directed immediately by telephone or in-person to qualified professionals. Please carefully read the Terms of Service (last updated February 8, 2012).