"But does it mean that it would have been okay to dismiss a man in the same circumstances (main carer for disabled children)?"
In my understanding as not a lawyer, the ruling is because women are disproportionately affected by caring responsibilities. This company wide policy of shifting all contracts to "flexible" shifts including compulsory weekend work would therefore disproportionately affect women more than men.
Perhaps a man in similar circumstances might have different grounds for a court case, rather than on the grounds of sex.