When light reaches us from the Sun, it arrives as many different colours; red, green, yellow, blue etc… (all disguised as a whitish light). You might have seen an experiment where a white light, with no obvious colour passes through a prism and splits into a rainbow of colours.
A similar thing happens in our atmosphere. The white light gets ‘scattered’ by molecules, like gases, in the atmosphere. Blue and Violet light gets scattered more than the other colours, so it appears everywhere. But we don’t see Violet so much because a) theres less violet light from the sun and b) our eyes don’t see violet so well.
Comments