To dance. In full, the expression is “to trip the light fantastic toe.” It comes from John Milton’s L’Allegro (1632). . . :
Come, and trip it as ye go
On the light fantastick toe.
—Charles Earle Funk, from Heavens to Betsy! and Other Curious Sayings, 1955.