Are you entitled to the deposit money? Mostly likely YES!!
Is it worth the hassle to retain the deposit? Most likely NO!!
Much of it is spelled out in the contract that was signed. You may have rights to the money. Most standard contracts will say default of the buyer is limited to deposits tendered. The problem arises that as an escrow agent (real estate brokerage), we can not release any funds to one party or another without consent of both parties.
Quite simply, if the buyer signs a release, handing over the funds it is nice and simple. If they don't, you are talking about hiring an attorney to get the deposit money if it can't be handled in small claims court. Minimally you are probably looking at $2500 in attorneys fees. If your talking about a minimal deposit, its probably not worth going after.... If its under $2000 you can probably go to small claims court.
Meanwhile, if you are retaining a deposit that is in question it may hold up selling your home. It may be best to move on and just get your home sold.
I am definitely not an attorney and in no way should you see this as legal advice, but this is how I have seen things play out before. If it is important to you to retain the deposit, seek the advice of a real estate attorney.