When the sun shines on the Earth, it warms up and this affects the weather and the climate. The angle that the sun's rays hit the Earth is important because it influences how much heat is absorbed by the Earth's surface. Imagine holding your hand over a flashlight. If you hold your hand straight up, the light will only touch a little bit of your hand. But if you tilt your hand so it's almost flat, the light will shine on it a lot more. This same thing happens with the sun's rays and the Earth.
So, when the sun's rays are straight overhead, they are more intense and the Earth gets hotter. When the sun's rays hit the Earth at an angle, they are more spread out and the Earth doesn't get as much heat. For example, when the sun is directly overhead, the equator receives more direct sunlight and it is warmer there, while the poles receive less direct sunlight and are cooler.
The changing angle of the sun throughout the year causes the seasons. When the northern hemisphere is tilted towards the sun, it is summer, and when it is tilted away, it is winter. This is why the seasons are opposite in the northern and southern hemispheres.
Changes in the Earth's orbit around the sun over long periods of time can also affect the climate. These changes can cause variations in the sun's angle that the Earth experiences, which can ultimately lead to a change in climate. This is known as Milankovitch cycles. However, these changes occur over many thousands of years and are not noticeable during a human lifetime.