See "Objectives of pre-action conduct and protocols" and "Steps before issuing a claim at court" here:
http://www.justice.gov.uk/courts/procedure-rules/civil/rules/pd_pre-action_conduct
"Settlement and ADR" is probably also relevant there.
See here if you think that the mediation route might be appropriate:
http://civilmediation.justice.gov.uk/
As you've suggested though (and as my first link makes clear), a court won't accept a case unless a formal written demand has been sent to the debtor. Your letter must be dated and show your name and address and that of your former landlady (or the name and address of her company if she trades as such). It must state the amount you're claiming and the reason for the demand. It must also provide a reasonable time for a response and a clear statement that you will commence legal proceedings if you've not received your money after that time. (e.g. "If I do not receive full payment of the said amount within 21 days I will commence court proceedings to recover this debt and request that the court makes an order requiring you to pay my costs in the matter"). You should retain a copy of the letter and send the original using Royal Mail's 'Signed For' service.
If the matter gets to court you'll need to provide all the relevant paperwork that you can lay your hands on. As well as a copy of the letter of demand you might also need your 'proof of posting' receipt and a screen shot from the Royal Mail website, showing that the letter was delivered. Paperwork showing the amount paid as a rental deposit and how much was paid back to you (together with any correspondence from the landlady, purporting to explain the deduction) might also be required.