Light, when it passes through a gas, will undergo refraction - this is readily seen by the distortion of the Sun's disc as it approaches the horizon, and its image passes through layers of air with different densities.
Sir I am thankful to you for your answer it appears that we are seeing refracted image of sun only in every situations but why it is more prominent at sunset and sunrise while distance and refractive index is same at noon and sunset or sunrise time
The rays leaving the 'top' of the Sun's image differ, most strongly, from that leaving the 'bottom' of the Sun's image, when the two ray paths pass through different masses of air.
The mass of air along the two ray paths is not the same.
The refractive index experienced along the two ray paths is not the same.
Of course it depends on the angle. Practically no refraction is visible when the angle is perpendicular, i.e. when Sun is exactly at zenith (astronomical noon on "right day" somewhere between tropic of Capricorn and tropic of Cancer). And most visible refraction effect are at sunrise/sunset, sometimes the Sun seems obviously elliptical - the effects strongly depends on the status of the atmosphere along the sight line.