(covers information from several alternate timelines)
Smoking was the act of igniting a substance in order to taste or inhale the byproducts of the thermal and chemical reaction to fire released in smoke. Some narcotic chemicals and medicines could be inhaled in this manner. On Earth, it was the traditional way of consuming tobacco, a practice that can be traced back to the peace pipe rituals of some Native American groups.
In 1944 of an alternate timeline created by multiple temporal incursions by various factions of the Temporal Cold War, Carmine discovered a communications device while with Alicia Travers for treatment. He explained that he had been searching her jacket for a cigarette. (ENT: "Storm Front, Part II")
After traveling back in time to Earth in July 1947, Quark, Rom, and Nog were baffled that Humans of the time would inhale poison in this way. Quark was especially excited, stating that if Humans bought poison, they'd buy anything. (DS9: "Little Green Men")
In a vision of 1953 New York City sent by the Prophets to Captain Benjamin Sisko in 2374, both Julius Eaton and Roy Ritterhouse were smokers (Eaton smoked cigarettes, Albert smoked a pipe, Ritterhouse cigars). (DS9: "Far Beyond the Stars")
In 1957, a cigarette machine was located in the Pine Tree Bar and Grill in Carbon Creek. (ENT: "Carbon Creek") One was also included in a holodeck recreation of New Orleans' Bourbon Street Bar set in 1958. (TNG: "11001001")
Smoking was still prominent in the 1980s. In 1986, a DeSoto Cab advertised Carlton cigarettes to pedestrians and motorists and Dr. Nichols, plant manager of Plexicorp, wore a pin on his sweater that read "I quit smoking". (Star Trek IV: The Voyage Home)
In 2004, Loomis, nervous about Xindi-Reptilians finding out he was helping Jonathan Archer find out more about them, starting smoking to calm himself. T'Pol, however, was disgusted by him smoking and asked him to put it out. When he told her to open the window in his car, she promptly put a phase-pistol to his head and he put out the cigarette. (ENT: "Carpenter Street")
In 2024, French police officer Leclerc was addicted to nicotine and smoked a cigarette while investigating CSS La Sirena, parked near Château Picard. When taking Leclerc hostage, the Borg Queen claimed she can help him overcome his addiction. (PIC: "Two of One")
The practice of smoking appears to be among the many Human practices adopted by the imitative denizens of Sigma Iotia II, as attested by the presence of a cigar humidor (as well as an ashtray) on the desk of Bela Okmyx. (TOS: "A Piece of the Action")
According to signs posted in the transporter room of the USS Enterprise in the 2280s, smoking was prohibited in that area. Smoking was also prohibited in the Mark IV bridge simulator. (Star Trek II: The Wrath of Khan)
Some members of the Banea smoked. When Tom Paris saw Lidell Ren smoking in 2371, he made the ethnocentric statement: "Smoking is a bad habit. My species gave it up centuries ago when we finally got it into our heads it was killing us". She explained that "Maybe I kill myself slowly because I don't have the courage to do it quickly." (VOY: "Ex Post Facto")
In the holoprogram Julian Bashir, Secret Agent, the characters of Duchamps, Hippocrates Noah, and Anastasia Komananov all smoked cigars. (DS9: "Our Man Bashir") In another of Bashir's holoprograms, Bashir 62, the character Lola Chrystal, a facsimile of Kira Nerys, lit a cigarette and blew the smoke flirtatiously at Odo. (DS9: "His Way")
Fictional characters of the Dixon Hill novels and stories also smoked. When Jean-Luc Picard played the role of Hill in the holoprogram version, he was offered a cigarette on at least two occasions. (TNG: "The Big Goodbye", "Manhunt") Nicky the Nose was another character seen smoking as well as several nightclub patrons. (Star Trek: First Contact)
Also in the holodeck, Deanna Troi smoked a cigar while in character as Durango, the mysterious stranger who comes to Sheriff Worf's aid in the town of Deadwood, (TNG: "A Fistful of Datas") and Data occasionally smoked a pipe in the role of Sherlock Holmes. (TNG: "Lonely Among Us", "Elementary, Dear Data", "Ship in a Bottle")
During the making of Star Trek: The Original Series, Gene Roddenberry and others associated with the production fought NBC and Desilu so that cigarettes were omitted from the series. "Even with the heaviest smokers, including myself, I fought for it," Roddenberry recalled. "In the end, it paid off for everyone; I think everyone now agrees that the original episodes would not be rerunning so successful if we had yielded to advertising pressure and put a 'twenty-third century cigarette' into the mouth of Kirk and others." (The Making of Star Trek: The Motion Picture, p. 43)
While having a bit of leftover time, John Teska created a shot of a member of Species 8472 sitting in a hallway relaxing with a cigarette and a couple of bottles by his side, much the way actors do in their off time. The shot was included in the VOY Season 4 DVD special feature "The Birth of Species 8472 ".
In the "Outtakes" section of ENT Season 1 DVD, a scene appears in which Scott Bakula should have entered the set for T'Pol's quarters but unlike in the episode, he waited behind the door to the set with two drinks and was smoking a cigarette, causing T'Pol actress Jolene Blalock to laugh.
In a deleted scene from ENT: "Storm Front" showed Sal smoking what he claimed was possibly the last Cuban cigar in New York City during the Nazi occupation. When he told Jonathan Archer that he didn't know what he was missing, Archer claimed he had a "pretty good idea."
Among the items which were sold off on the It's A Wrap! sale and auction on eBay was a cigar traveler humidor which stood in for a set dressing container in an episode of Star Trek: Enterprise. The original tag of the container says "Cigar Traveler Co., Carson City, Nevada".