These three groups campaigned into Africa and towards India, I wondered are there any sources on sunburn problems and how they tried to prevent it?
I don't think there's much out there regarding the ways ancient people protected themselves against the sun, but from an art/history perspective, there's evidence from paintings suggesting that clothing covering the body, veils and large brim hats were used by Greeks, and that umbrellas existed in ancient Egypt, Mesopotamia, China and India. I don't know about any kind of "ancient sunscreen," though.
Urbach, F. "The historical aspects of sunscreens," J. Photochem. Photobiol. B., Nov. 2001.
While I cannot speak to the prevention, there are sources on treatment.
It can only be assumed they employed the known medical methods of the time. Pliny the Elder served in the Roman military, and he records some of the known medical remedies in his Natural History. In particular, they were well aware of the benefits of aloe in treating sunburn, sometimes mixed with honey (27.5). Vinegar also was used for improving "complexion," (23.27) which seems to refer to sunburn.
Sources:
Pliny the Elder, The Natural History, trans. John Bostock, 1885. at Perseus