The belief was that when the first soldier lit his cigarette, the enemy would see the light; when the second soldier lit his cigarette from the same match, the enemy would take aim; when the third soldier lit his cigarette from the same match, the enemy would fire.
There was in fact no such superstition during the First World War. (The light would not be visible if the soldiers were in a trench or bunker, as they usually were when not attacking.) The superstition was alleged to have been invented about a decade later by the Swedish match tycoon Ivar Kreuger in an attempt to get people to use more matches but it appears he merely made very shrewd use of the already existing belief which may date to the Boer War.
The satirical 1983 British film Bullshot starts out in the trenches of World War I with the hero of the story, Captain Hugh "Bullshot" Crummond, explaining the concept of "three on a match" to some of the young soldiers under his command.
A reference to the superstition is made at the start of the movie The Best Years of Our Lives when the three GIs are riding home in the front of the plane and light a second match to light the third cigarette.
A reference to the superstition was made in the American television series Mad Men, including the fact that it was used in an attempt to sell more matches.
In the 1984 movie Bachelor Party, Tom Hanks' character declines an offer for drugs with "three on a lude is bad luck".
A reference to the superstition was made in the 1956 Popeye cartoon "I Don't Scare". Popeye, using a match to light three sticks of dynamite in arch nemesis Bluto's mouth, says "Three on a match is very bad luck."