The surface of the earth is not heated uniformly by sunlight. This results in a differential heating, which sets the stage for convection.
A generalized model of understand why the wind blows involves: the relationship between air temperature and air density and the relationship between air pressure and movement air.