This thread proves that the message isn't clear. If they'd said, "Girls should dress appropriately, in line with school uniform guidelines," it would have been fine (and probably meant that they would be dressed fairly modestly, as I don't suppose the school uniform allows very short skirts, cropped tops or tottering high heels.)
But they imply that dressing immodestly will be unsafe. They don't define how they mean unsafe; they could have said "please make sure that children are dressed warmly coming to and from the disco, as the forecast is for cold weather, and we want to avoid hypothermia." They could have specified no heels that might damage the floor or girls' ankles. They could have specified steel toe-capped boots, hi-vis jackets and helmets, if they really want people to be dressed safely.
Instead, they've made a vague comment about modesty and safety, without telling people what risks there actually are. By linking them together, they are are implying immodest dress compromises your safety, and it will mostly lead people to think about rape myths, rather than fire evacuations (though my mother usually went on about the risk of kidney infections with exposed backs, rather than anything else.)
Giving young girls the message that what you wear will make you more or less susceptible to rape is a damaging lesson to give - there's plenty of evidence that what you wear makes no difference to your risk of being raped - you might still get raped if you're wearing jeans and a heavy jumper - or even a hi-vis jacket, steel toe-capped boots and a helmet. They would be better off teaching them all about consent and what counts as rape (as plenty of people seem to struggle with that), although a letter home about a disco isn't the place for that.
A vague message of "wear immodest clothing, and you won't be safe" is of little use to anyone. It doesn't define what they consider to be modest clothing, nor what the risks actually are. It's about as good as saying, "the bogey man will get you if you don't behave."