Dress codes
Dress codes can discriminate if the employer imposes a requirement that disadvantages one group. In Department for Work and Pensions v Matthew Thompson (EAT/0254/03), the EAT decided requiring men to wear ties was not necessarily discriminatory. It was lawful to impose rules regarding the wearing of specific items of clothing on one sex to promote “smartness”, as long as the same standard of smartness was applied to both sexes.
For the law on dress codes and religious observance see above - Religious belief in the Workplace. Most employers try to adopt a flexible and collaborative approach to dress codes when it comes to religion. In 2013, the ECHR produced new guidance on dress codes and religious observance. You can find it on their website.