Because the light is being bent at so many different angles, and travelling at different speeds when it passes through Earth's atmosphere, it causes many different wave patterns in the light. This causes the twinkling of the star to be multicoloured! You can see this refraction at home by shining light through a prism.
Why do stars twinkle refraction?
The twinkling of a star is due to atmospheric refraction of starlight. ... The atmospheric refraction occurs in a medium of gradually changing refractive index. Since the atmosphere bends starlight towards the normal, the apparent position of the star is slightly different from its actual position.
Why the sun does not twinkle?
Why the Sun Does Not Twinkle
However, the sun is quite close and therefore looks more like a disk than a tiny dot in the expanse of space. Therefore, atmospheric refraction does not play such a large role in the perception of the earth and therefore does not seem to blink.