The answer to your question depends upon when your friend's tenancy commenced:
If the tenancy commenced on or after 06/04/07 the landlord was legally obliged to pay the deposit into a tenancy deposit scheme (or to pay a premium to an insurer, under the scheme, while actually retaining the deposit).
If your friends' tenancy commenced on or after that date, they should demand to know which scheme was used, and then use the dispute procedure provided under that scheme.
If your friends' tenancy commenced on or after that date but the landlord failed to comply with his legal obligation to use a tenancy deposit scheme, your friends should make an application to the county court. The landlord will be ordered to repay
three times the tenancy deposit.
Further information, relating to the paragraphs above, can be found here:
http://www.direct.gov.uk/en/TenancyDeposit/ind ex.htm
If the tenancy commenced before 06/04/07 the rules relating to tenancy deposit schemes do not apply. Your friends should send the landlord a formal notice (by recorded delivery) stating that they demand immediate repayment of the money which is being unlawfully withheld. The notice should specify a period within which payment must be made (e.g. 7 days) in order to avoid court action. If no such payment is received, your friends should initiate formal action, either by using Money Claim Online (which is a service provided by Her Majesty's Courts Service) or through the local county court. Full information about both of those procedures can be found from here:
http://www.hmcourts-service.gov.uk/infoabout/c laims/index.htm
Chris