To expose one's bare buttocks as a joke or insult, or to gaze at the moon dreamily.
The buttocks sense is modern American slang (1960s-70s), possibly from the moon-shaped appearance. The dreamy sense relates to the moon's poetic associations with reverie.
Mooning as a prank exploded in popularity during the 1960s counterculture, becoming the ultimate teenage rebellion—a literally bare-faced rejection of propriety that's memorable precisely because it's so absurd and undeniable.
Complete word intelligence in one call. Free tier — 50 lookups/day.