During sunrise, the sun is rising above the horizon. The rays from the sun get refracted as they travel from more dense air to less dense air. Also, the human eye sees the sun rays as a straight line, which appears as the sun has risen. But it has actually not yet risen.
Delayed Sunset ExplanationThe sun, after sunset, is setting below the horizon. Now, the apparent position of the sun is visible to us and not the actual position. This is because of the atmospheric refraction.