(A) Twinkling of stars:
The twinkling of stars is due to the Earth's atmosphere. As starlight passes through the atmosphere, it encounters varying densities of air, causing the light to bend or refract. This refraction changes the direction and intensity of the light, causing the star to appear to flicker or twinkle.
(B) Advanced sunrise and delayed sunset:
This occurs due to the Earth's atmosphere as well. When the Sun is just below the horizon, its light is bent (refracted) by the Earth's atmosphere, allowing us to see it before it has actually reached the horizon (advanced sunrise) and after it has actually moved below the horizon (delayed sunset). This bending of light extends the length of daylight.
(C) Blue color of the sky:
The blue color of the sky is caused by Rayleigh scattering. Shorter wavelengths of light (blue and violet) scatter more than longer wavelengths (red, yellow). When sunlight enters the atmosphere, the blue light is scattered in all directions, making the sky appear blue to our eyes.
(D) Reddish color of the sky during sunrise and sunset:
At sunrise and sunset, the Sun is low on the horizon. Its light has to pass through a thicker layer of the atmosphere compared to when it is overhead. During this journey, most of the blue and green light is scattered out of the line of sight, leaving the longer wavelengths (red, orange) to dominate the sky’s color.
These explanations are based on the interaction of light with the Earth's atmosphere.