The Bible doesn't forbid dancing when it's done properly. Psalms 149:3 and 150:4 speak of praising God with dance. Ecclesiastes 3:4 says there is a time to dance, and 2 Samuel 6:14 tells us that King David danced when the ark was being brought into the city.
As for why some teach against dancing, one reason is likely because many people don't dance properly. Some dance provocatively with sensual or sexual innuendos or suggestions by their movements. Some hold their partners too closely or touch in inappropriate places when dancing.
These types of dancing have given rise to the description of dancing as "hugging set to music."
Since music and dancing are by nature emotional expressions, dancing also has the potential to have sexual overtones that go against God's instructions about purity.
While there is no direct prohibition against dancing, we are told to live our lives in purity, moderation and as examples to others (1 Timothy 4:12 ; Matthew 5:14 -16).
This means that if we choose to dance, we should conduct ourselves in accordance with these instructions.