Drones can be programmed to dance by detecting beats in music using audio APIs and analyzing frequency patterns. They can follow preprogrammed dance routines or mirror human movements detected through video or motion sensors. Example routines could include a waltz, boogie, or dad dancing at a wedding. The document discusses using an ARDrone to dance and provides example videos of drones dancing to music.