Rudy's Starmie practices dancing techniques in the Trovita Island Gym and uses them during battle to improves its footwork and agility.
Since Starmie knows electric type moves it is useful to Rudy as he likes to hold battles with Pokémon with the same type.