ACAS has just published updated guidance, available here, on how to apply dress codes in the workplace.
The guidance is a one page summary and its key points are:
ACAS encourages employers to fully consider the reasoning behind a dress code policy. In particular that employers ought to have a decent business reason for any restrictions in the policy and that it should not be discriminatory. The guidance goes into further detail on how to approach tattoos, body piercings and religious dress.