Q. Why is there a custom to dance after saying kiddush levana?

A. In only one instance the Remo praises and extols dancing and that is in Darkei Moshe (426) in regards to Kidush Levana. He mentions that the reason for the dancing contains a great Cabalistic “sod” or mystery similar to the joy of newlyweds, since we then receive the Shechina (Otzar Hayedios p. 293, see also Remo O.H. ibid. 2.)
Meor Einaim compares Kidush Levana to the receiving of the Torah and the joy and happiness that it contained. (Milin Kadishin 84)
Mekadesh Yisroel (Bein Hametzorim 310) in regards to dancing on Kidush Levana on Motzei Tisha B’Av mentions that since the Remo considers the dancing a mitzvah it should be permitted even in the state of avelus still present at the end of the fast. The dance is done to foster our belief in the Geula, since in Tisha B’av the Messiah was born. He adds that this is the common accepted tradition.
Horav Shlomo Miller Shlit”a pointed out that Poskim mention that one of the reasons that Kidush Levana is not recited on Shabbos, is due to the dancing involved.(Shaar Hatzion 426: 32)

Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit”a