The first most common answer is the atmosphere. Rather, its condition in the troposphere. But what's behind the condition of the atmosphere? One word: heat. Which comes from the sun. Basically, the sun heats up the layers of air in the atmosphere which causes convection currents in the air. These convection currents determine which way the wind is blowing, where it's blowing and the weather itself. Air pressure also depends on heat; where the air is lighter and heavier. This is air pressure, and whether it will rain or not depends on this. The air pressure causes cold and warm fronts, which contribute greatly in the condition of the weather.