Because GZ the sun mainly warms the Earth's surface which then warms the air. As the warm air rises it cools and we get what we know as weather.Dave R.