Answer:
It is primarily due the Sun.
Step-by-step explanation:
Sun is the ultimate source of energy.
Due to the heat of Sun, the atmosphere heats up unevenly. Due to which there is a temperature difference between the two regions. As the temperature difference is maintained, the air flows, i.e., atmosphere is moving.
Similarly, water gets heat up unevenly in oceans. Due to which a temperature difference is maintained between two points in the ocean and thus the oeans are moving constantly.