All cultures and peoples knew rain dance. The Dacians and the Slavs had for example Paparuda, and a rain ritual (Caloian). Egyptians had a rain dance. The Hopi and Pueblo Indians danced for rain under the leadership of their traditional medicine man.
RegendansAccording to science, there is no connection between dance and sometimes subsequent rain (discovered so far).
The witch doctor was often the oldest, wise man of the tribe. And rain was vital for a good harvest, without which winter is difficult or impossible to bridge.
It is also possible that such an experienced shaman dances are postponed because he knew as good observer when rain was coming. So cause and effect were in fact reversed.

Everywhere a rain dance is a ceremonial dance ritual to beg for rain to the rain god (e.g. Pluvius) and thus ensure the harvest.

Maybe Gene Kelly for ‘Singin 'in the Rain’, a well-known musical film from 1952, and one of the first movies with sound, has also found inspiration in rain dances.