There are a number of possible explanations:
1. Solicitor did a bunk with the deposit. Theoretically possible, but no basis in reality. I certainly don't believe it happened.
2. There was a patently unreasonable clause which basically said "we can pull out without penalty if we like at any time" which the solicitor should have spotted and insisted be removed. As previous poster says, such a clause would not be standard. Slim possibility. Certainly can't rule it out. But most unlikely.
3. There was a relatively standard clause to say that the contract was subject to loan approval, satisfactory survey or other 'normal' contingency, and buyer relied upon this in pulling out. This, I raather suspect, is the most likely explanation of what happened.
I would always ask a client vendor whether they want to sign a contract with such a contingency inserted, or whether they would prefer to simply give the buyer time to sort out loan\survey\life insurance\whatever and then sign an unconditional contract;
Signing of a contract with such a contingency clause is perfectly normal. Not making client aware that there was such a clause is a bit slack, but such clauses are almost normal\standard ( certainly for loan approval) - so I can see how some solicitors might (wrongly in my view) feel that they had things covered without such clause being very particularly being drawn to client's attention. Of course, I do not rule out the possibility that it was mentioned to client, but client failed to take it on board.
So: most likely explanation is that the solicitor could perhaps have done a wee bit better on the communications front at time of signing contracts, but that's it. No negligence. Probably a complete waste of time pursuing this at the time. Certainly a complete waste of time doing so now.