I don't know what, if any, rules or safeguards that the railway has in place. As Iskra has said, it's a professional responsibility for individuals involved to ensure that their fasting does not compromise the safety of themselves or others at work - this holds true not only for Ramadan, but in other situations too (for example, it would surely be considered unprofessional for a driver to turn up at work under the influences of a "legal high", even though there may not be a specific rule about the substance in question - if they were putting their passengers' safety at risk, it would surely be an extremely serious issue).
We should, of course, respect the wishes and beliefs of our Islamic colleagues and respect their right to observe Ramadan in their way, provided their practices do not impact on others. An excellent quote from a Ramadan advice website I've found explains this quite nicely:
While you are proposing a plan that you believe will enable you to work as productively as possible, your boss will be battling against other business dynamics which may affect how much flexibility he or she can offer. Your firm has the right to refuse your requests but only if there are clear business reasons for doing so, not due to your faith or observation of Ramadan.
Link
As such, I think it's reasonable to assume that should a fasting driver put the safety of his passengers at risk (for example, through a hypoglycaemic coma), it would be appropriate for this to be considered a disciplinary case - but it would be in breach of the equality act to ban drivers from fasting on grounds of their religion.
Of course, practicing Muslims have a right to fast. However, I would agree that it's more important that they don't put the safety of themselves and others at stake in doing so - indeed, some groups are considered exempt from fasting. Children, pregnant women, the elderly, the infirm etc are exempt. Indeed, even otherwise healthy muslims can eat in cases of "intense hunger". There are various opinions on the subject of working adults that I've seen online, which include advising people to work night shifts or take annual leave during Ramadan. It is, after all, an extremely important part of the religion, and an extremely holy month for Muslims. If it's not possible to alter your working pattern, it is generally advised that people do eat as little as possible, but sustain themselves in order to do their job. In general, it is considered a sin to risk the life of yourself or others through your fasting.
I'm not a Muslim, but I'd be very keen to hear from the Islamic community about their thoughts on this.
And, of course, what I've said about fasting applies not only to the Islamic community during Ramadan, but to all other fasting, whether it be for religious, dietary, or other reasons.
And, let's also consider, how many train drivers are "fasting" at work anyway? Plenty of people don't eat breakfast, and I'd imagine that that will include at least some train drivers.