From a musical in 1906
If something happens once in a blue moon, it’s rare. Even rarer, in the expression, than an actual “blue moon,” which refers to a month with two full moons, the second one being “blue.”
Thought to be called “blue” after an old english term meaning “betrayer,” a Blue Moon is an extra full moon that occurs due to a quirk of the calendar…
… about once every 2.7 years, because the number of days in a lunation (new moon to new moon) is a bit less than the usual calendar month — 29.53 days as opposed to 31 or 30 days (except for February, which has 28 days, so a blue moon cannot occur). space.com
“Blue Moon” is widely used this way in the media, but only in the last 30 years. Phil Hiscock wrote the fascinating tale for skyandtelescope:
The term “blue Moon” has been around a long time, well over 400 years [as in]
“He would argue the Moon was blue” was taken by the average person of the 16th century as we take “He’d argue that black is white.”
So where did our current usage come from? In May 1988, when a second full Moon occurred, radio stations and newspapers everywhere carried an item on this bit of “old folklore,” as they called it…
In 1986, in the Trivial Pursuit Genus II edition, “blue moon” is a question, and their source was a children’s book, The Kids’ World Almanac of Records and Facts (New York, 1985: World Almanac Publications). Then, in the December 1990 edition of Astronomy, Deborah Byrd mentioned the term came from a March 1946 article in Sky & Telescope (page 3)
So while the phrase may not be old folklore, it’s folklore today.