On a recent episode of ABC’s popular comedy “Modern Family,” the new couple next door to the Dunphy family has an unusual line of work: They own a marijuana dispensary. But nobody on the show seems to care, and when the Dunphys get into a feud with the neighbors, it’s about something entirely different—the eyesore powerboat parked in their driveway.

It was not always thus in TV-land, where pot has been a long-standing taboo. Even a comedy with lots of jokes about the stuff, “That ’70s Show,” never showed anyone actually lighting...