Yes, a deposit on rental of an apartment or house can be refunded, and in most states, there are laws stating the circumstances for which deposits must be refunded and time limits for return of the money. As a tenant, it is your responsibility to read and understand the refund policy listed in your signed lease.
There are legitimate reasons for a landlord to NOT return a rental deposit. Examples of those situations would be when a tenant breaks or terminates a lease before the end date, owes back rent, damages the unit, or leaves behind unpaid utility bills. Many landlords also deduct from the deposit to cover cleaning expenses. If you feel the landlord is unjustly keeping your deposit, politely ask for detailed proof of why the refund was kept- receipts, bills, or even pictures of alleged damages. After reviewing the proof, If you still don’t agree, or if no proof is forthcoming, contact an attorney or your local legal aid office.