What can a landlord take out of your security deposit? Generally, three things: late or unpaid rent; costs to repair damage to the property; and exceptional cleaning costs.
If you don't pay the rent that's due, the landlord is allowed to deduct it from your security deposit. The deposit serves as security against both damages (see below) and nonpayment. For residential leases, since a common security deposit is equal to one month's rent, what this often means is that if tenants try to avoid paying the last month's rent, the landlord can recover it from their security deposit.
The ,main purpose of a security deposit is to pay for damage to the premises. Ordinary wear-and-tear is NOT damage for this purpose; however,if tenants break a window, door, appliance, plumbing, etc. that--and any additional damages that comes from it, such as water damage--would be something for which the landlord could take the cost of repair or replacement out of the deposit.
Also, if the damage is not something the tenant caused or otherwise is responsible for, then the landlord can't apply the tenant's security deposit to it. Instead, he should file an insurance claim or sue the responsible party.
This is actually a subcategory of repairs. Remember, ordinary wear-and-tear--and so the normal cleaning done at the end of any tenancy--is not something the landlord can take out of the security deposit. But if the tenant makes an exceptional, unusual, or unreasonable mess, the landlord might be entitled to deduct money from the security deposit to clean. Examples of this include pet stains on rugs or furniture, children drawing on walls, mold caused by a lack of hygene, and similar conditions that are not simply normal wear and tear.
If you suspect your landlord is improperly withholding all or part of your security deposit, a lawyer can help you understand if that in fact is the case--and then help you get the deposit back.
Need a lawyer? Start here.