Fun was the feeling of enjoyment or entertainment from an activity, and was typically associated with recreation.
In 2268, Captain James T. Kirk told a group of orphaned children on the planet Triacus that it was late and time to go up to the USS Enterprise. The children were displeased as they were just beginning to have fun playing. After getting ice cream from a food synthesizer inside the arboretum aboard the ship, a child responded to Nurse Christine Chapel that it was fun to get ice cream out of a computer. (TOS: "And the Children Shall Lead")
In 2293, Tuvok expressed his opinion to his fellow crewman, Dimitri Valtane, that the actions of Captain Hikaru Sulu in attempting to rescue his former USS Enterprise comrades were illogical and reckless. Valtane asked if it wasn't more fun than charting gaseous anomalies. To this, Tuvok objected that the Human fascination with fun had led to many tragedies in its short, but violent history, that one wondered how the Human race had survived having so much fun. (VOY: "Flashback")
In 2366, observing her son Wesley with a girl, Doctor Beverly Crusher told Guinan that it was healthy for a boy his age, that it was good to see him having fun for a change with an attractive young woman who looked at him with extraordinary affection. She then, seeming troubled, asked Guinan what she knew about this girl. (TNG: "Evolution")
In 2367, experiencing the violence of Captain Jean-Luc Picard's Dixon Hill holographic program, Guinan asked him incredulously if this was what he did for fun. He explained that it was a mystery, that they had to search for clues. She asked if this was fun and he agreed that it was, in fact, fun. Picard was called away before the scenario could be completed, but offered Guinan the opportunity to continue if she wished. She, however, told him that she had enough fun for the day. (TNG: "Clues")
In 2368, the crew of the USS Enterprise-D had their memories briefly removed as part of an attempt by a Satarran to manipulate them against the Lysians. Commander William T. Riker and Ensign Ro Laren conducted a search of the vessel together, each of them unaware of their true identities, nor the usual friction between them. Ro asked Riker what he thought he would being right now if things were normal and he replied that he imagined he would be having more fun than searching the ship. "Fun?" questioned Ro and he said that he thought he could create an interesting program using the holodeck they had seen. She called this disappointing, stating that he didn't strike her as a man who needed a holodeck to have a good time. (TNG: "Conundrum")
In 2371, Lieutenant commander Data was one of a number of crew of the Enterprise-D in attendance on the holodeck for a ceremony for Worf being promoted to the same rank, set aboard a replica of an ancient sailing ship. He was confused as to what was amusing when everyone laughed when Commander Riker stated "remove the plank" instead of "retract the plank," causing Worf to fall into the water below. Doctor Beverly Crusher told him that it was all in good fun. He told her he did not understand, to which she responded that he had to get into the spirit of things, to learn to be spontaneous, to live in the moment and do something unexpected. He stated that he got it and then shoved her into the water, but nobody found what he did amusing. (Star Trek Generations)
In 2372, Quark attempted to advertise his establishment Quark's Bar, Grill, Gaming House and Holosuite Arcade by playing the slogan "Come to Quark's, Quark's is fun, come right now, don't walk, run!" over the communications system of Deep Space 9, but was stopped by Odo, who reminded him that tampering with the station's comms system was a class 3 offense. (DS9: "The Quickening")
In 2373, B'Elanna Torres discovered a deleted file, a holographic program titled Insurrection Alpha in the database of the USS Voyager and ran it under the belief that it was a holo-novel. When her boyfriend Tom Paris discovered her running it, he asked her to reset it for him and managed to convince her by noting that half the fun of a holo-novel was having someone to share it with. Later, Paris detailed to Torres how had chosen to initially resist the scenario featured in the novel, in which Commander Chakotay led a Maquis mutiny and by the time he finally joined was assigned to lubricate the warp plasma manifolds. Torres told him that he should next time just go along with the mutiny from the beginning, that it was much more fun. Following this, when it was discovered that Tuvok had written the program, intending it be security training, he stated that the program should be deleted due to its potential to incite animosity. Captain Kathryn Janeway, however, felt that the program had become a bit of harmless fun and that the crew needed entertainment and creative outlets. (VOY: "Worst Case Scenario")
In 2376, Seven of Nine, a former Borg drone, was tasked with overseeing the education of a group of children who had similarly been freed from the Borg. She told them that she had allotted one hour for recreational activity and that fun would now commence. They, however, soon rebelled against her attempt at imposing order. Later, in listening to the schedule that Seven had created, Commander Chakotay commented that it sounded like there was not much time for fun. She told him that she had, in fact, scheduled time for recreational activities and presented him with the fact that the schedule read "1500-1600 hours: fun." Chakotay, however, told her that one could not always schedule fun, that sometimes it had to be spontaneous. She noted that children required structure, but he told her that she was taking it to an extreme. Later, Seven had the children do clay sculpture and instructed them to make geometric shapes. Mezoti, however, instead chose to sculpt an image of her, stating that it was more fun. Seven called it crude, but agreed that it did demonstrate ingenuity and individuality and told her to continue. (VOY: "Ashes to Ashes")