Stars appear to twinkle due to the Earth's atmosphere. When starlight enters our atmosphere, it is refracted or bent by the various layers of air at different temperatures and densities. This bending of light causes the star's image to shimmer and appear to twinkle when we see it from the ground.