Why does it get hotter in the summer?

During summer, the northern hemisphere tilts towards the Sun. As a result, the Sun shines longer in the summer, and the longer it shines, the hotter it gets. At this time southern hemisphere has winter. Then things swap six months later when the bottom half is closer to the Sun.