How is sunlight responsible for wind energy?
Differential heating of different landforms causes pressure difference.
Different parts of Earth receive different intensity of sunlight and also different landforms have different ability to heat-up. The air mass above hotter regions develop low pressure and that above colder regions develop high pressure. Wind blows from high pressure region to low pressure region. Thus sunlight is the ultimate source of energy for winds.