It's mainly because of our Earth's axis. Our Earth's axis is tilted about 23.5 degree. Hence when the earth revolves around the sun sometimes northern hemisphere points towards the sun while sometimes southern hemisphere. This causes season.
When northern hemisphere of earth tilted towards the sun , its rays strikes on northern hemisphere. Thus causes summer season due to increase in temperature in that region. When northern hemisphere points away from the sun , the sun rays fall slanting on it. This causes winter season due to decrease in temperature
.
When the earth is neither tilted nor away from the sun the temperatures are normal ,causes spring and autumn seasons.