The sun can be seen about two minutes before actual sunrise because of atmospheric refraction of sun’s light as shown in the following diagram. When the sun is slightly below the horizon, then the sun’s light coming from less dense air to more dense air is refracred downwards as it passes through the atmosphere and the appears to be raised above the horizon.