This snowclone originated with the Partnership for a Drug-Free America’s 1987 PSA:
The original phrase was frequently lampooned in subsequent years, becoming strong enough in popular culture that the variations in place of ‘drugs’ probably didn’t take long to appear at all. The snowclone is mainstream enough now to appear in the title of a recently published book: This Is Your Brain on Joy.
Most other variations on X are meant to evoke the altered state–good or bad!–your brain is in on X: music, crack, technology, television, fox, exercise, pink floyd, gluten, estrogen..
Edited to add: A case can be made for this is your X on drugs also being derived from the original anti-drug PSA, as noted by commenter Emily, but I think the X on drugs snowclone is a separate thing, since referring to “Azumanga Daioh … as ‘Peanuts on LSD’” is not the same as saying, “This is Peanuts. This is Peanuts on LSD.” The “this is your” part of the phrase is obligatory–without it, the connection to this particular snowclone is lost.