On Simhath Torah we must be happy that we have had the merit to complete the Torah. Some have the custom of lighting many candles in the Synagogue, night and day, in honor of the Torah. Even though we do not ordinarily dance on Yom Tob, we are permitted to do so on Simhath Torah, because it is in honor of the Torah.
What is key, however, is that one must have in mind that all the celebrations are for the sake of Heaven. One must take extreme care not to mix in with this holy rejoicing, any hint of silliness or improper behavior. Rather, one must "rejoice, but with trembling".
We are told about King David, that he danced before the Torah, with all his might, and clapped one hand over the other. This is the basis of the custom we follow in Simhath Torah.
(See Rama 669:1. Kaf Hahayyim, ibid., Oth 19-21, 23)
Simchat Torah, Simhat Torah, Simchas Torah, Simhath Torah, Dancing on Yom Tov, Yom Tob