http://www.hse.gov.uk/contact/faqs/toilets.htm
The relevant legislation is the Workplace (Health, Safety and Welfare) Regulations 1992. Regulation 20, Sanitary conveniences, states:
Suitable and sufficient sanitary conveniences shall be provided at readily accessible places.
Without prejudice to the generality of paragraph (1), sanitary conveniences shall not be suitable unless -
the rooms containing them are adequately ventilated and lit;
they and the rooms containing them are kept in a clean and orderly condition; and
separate rooms containing conveniences are provided for men and women except where and so far as each convenience is in a separate room the door of which is capable of being secured from inside.
https://www.gov.uk/government/uploads/system/uploads/attachmentdata/file/410294/Adviceeonstandardssforschooll_premises.pdf
SS Regulation 23A — (1) Subject to sub-paragraph (2), the standard in this paragraph is met if the proprietor ensures that—
a) suitable toilet and washing facilities are provided for the sole use of pupils;
b) separate toilet facilities for boys and girls aged 8 years or over are provided except where the toilet facility is provided in a room that can be secured from the inside and that is intended for use by one pupil at a time; and
c) suitablechangingaccommodationandshowersareprovidedforpupilsaged11 years or over at the start of the school year who receive physical education.
(2) Where separate facilities are provided under sub-paragraph (1) (a) for pupils who are disabled, they may also be used by other pupils, staff, supply staff, volunteers and visitors, whether or not they are disabled.
SPRs Regulation 4 — (1) Subject to paragraph (3), suitable toilet and washing facilities must be provided for the sole use of pupils.
(2) Separate toilet facilities for boys and girls aged 8 years or over must be provided except where the toilet facility is provided in a room that can be secured from the inside and that is intended for use by one pupil at a time.
(3) Where separate facilities are provided under paragraph (1) for pupils who are disabled, they may also be used by other pupils, teachers and others employed at the school, and visitors, whether or not they are disabled.
(4) Suitable changing accommodation and showers must be provided for pupils aged 11 years or over at the start of the school year who receive physical education.
Sorry the formatting is a bit off. Haven't got time to edit.