Just why a vigorous and plentiful use of cuss words is supposed by us figuratively to affect the color of the atmosphere, especially to give it a blue tone, is a matter of guesswork.
The history of our language does not show how the concept arose.
The association of “blue” with evil is not altogether recent, however. Back in 1742 Edward Young in Night Thoughts on Life, Death and Immortality, wrote, “Riot, pride, perfidy, blue vapours breathe,” in which he referred to “blue” as the color of plagues.
And baleful demons were described as “blue devils” more than a hundred years earlier when, in 1616, these lines appeared in The Times’ Whistle:
Alston, whose life hath been accounted evill,
And therefore calde by many the blew devill.
Joseph P. Roppolo, of the Department of English, Tulane University, discussing the use of “blue” in the sense, indecent, obscene, suggests the possibility of the following explanation, in American Speech, Vol. XXVIII, No. 1:
Early in its history, blue acquired symbolic meanings which are diametrically opposed.
As the color of the clear sky and of the sea (both good), it came to be the symbol of purity, of fidelity, of staunchness, and of faith, and, by symbolic extension, it was chosen as one of the colors of the Virgin.
Perhaps simultaneously (since both extremes involve morality and seem to be connected with the Christian religion), a flame which burned blue came to be associated with the flames of burning brimstone and therefore of hell; such a flame, quite logically, was regarded by the superstitious as an omen of death or other evil or was believed to indicate the presence of ghosts or evil spirits or of the devil himself.
From these beliefs, it seems probable, developed blue-blazes, meaning hell, and such statements as “he talked blue” and “he made the air blue,” meaning, respectively, “He talked obscenely” and “He cursed and swore”: cursing or sinful talk would evoke evil spirits or the devil, whose sulphurous presence would cause flames to burn blue.
Such talk, again logically, although this is admittedly conjecture, would become blue talk, and an oath or a curse a blue word.