Yes, sun exposure can trigger melasma because the pigment cells in the skin responsible for producing colour in the skin are stimulated by UV rays from the sun. As such, it is essential to wear sunscreen and other sun protection measures and avoid prolonged sun exposure.