The moon and the sun appears larger at rising and setting because it is an optical illusion. An observer is seeing the moon or sun in comparison to the size of other objects, namely buildings, trees, or whatever is on the horizon. The buildings and trees are small in comparison to the sun or moon at the horizon so they appear large. When the sun or moon move to a higher point in the sky away from the horizon they appear smaller because there is nothing to compare their size to but the sky. The area we see around the sun and moon is much larger than the size of them so they appear small. This is how we determine the size of everything in the world by making a comparison between two or more objects.
You can help the HubPages community highlight top quality content by ranking this answer up or down.
Light from the sun or moon after travelling through vacuum enters into our atmosphere. As light passes from a rarer medium to a denser one, its course is deviated towards the common normal. This deviation of light is called Astronomical refraction.