The path of the rays of light coming from the star goes on varying slightly.
The amount of light entering our eyes from a particular star increases or decreases randomly with time, sometimes, the star appears bright and other times, it appears fainter. This gives rise to the twinkling effect of the star.
The planets do not show twinkling effect:
As the planets are much closer to the earth, the amount of light received from them is much greater and the fluctuations caused in the amount of light due to atmospheric refraction are negligible as compared to the amount of light received from them.