References can be provided either in a personal capacity or on behalf of the company. The employer is legally responsible for references given on behalf of the company, so you should have a policy that sets out clearly which employees are able to give references, in what format and with what content.
No obligation
As a general rule, there's no obligation to provide a reference, although there are some exceptions. Failing to provide a reference on account of one of the nine protected characteristics in the Equality Act 2010 (age, disability, gender reassignment, marriage and civil partnership, pregnancy and maternity, race, religion or belief, sex and sexual orientation) could leave an employer open to a discrimination claim, unless the company has a policy of not giving references to anyone. Similarly, failing to provide a reference where an employee has previously brought a discrimination claim against the employer could leave the door open to a victimisation claim.
Content matters
The contents of the reference are important: you owe a duty of care to the ex-employee and the prospective employer. Untrue or inaccurate statements could also lead to claims for defamation, malicious falsehood or negligent misstatement from both the ex-employee and future employer.
Make sure the information given is true, accurate and fair. There is no obligation for it to be comprehensive, and no minimum amount of detail is required. However, it is also important that a prospective employer is not misled by any omissions – in one case an employer completed a questionnaire but omitted to answer questions on the employee's integrity, thereby giving the (false) impression that he lacked integrity.
A reference can be purely factual, with content limited to the dates of employment and job title, although you should also state that this is company practice to avoid any negative inferences.
Additional information should be accompanied by a disclaimer stating that the reference is given in good faith and that no liability will be accepted for any errors, omissions or accuracies (although unfortunately this is not foolproof).