(covers information from several alternate timelines)
A diaper was a type of absorbent garment usually worn by infants to aid in containing bodily waste.
During a conversation in which an apparently seventeen-year-old Sim expressed his interest in T'Pol, he felt that her declining his invitation had something to do with the fact that he was "different," figuring, "I guess it must be weird, being with someone like me. Five days ago I was wearing diapers." (ENT: "Similitude")
Following repeated offers by Montgomery Scott, in 2369, to assist Geordi La Forge in engineering, which ultimately resulted in La Forge telling Scott that he was "in the way," the angry Scotty retorted that he "was driving starships while [La Forge's] great-grandfather was still in diapers." (TNG: "Relics")
In a similar vein, during their encounter in the Nexus, James T. Kirk remarked to Jean-Luc Picard that he "was out saving the galaxy while [Picard's] grandfather was in diapers" after the latter reminded him of his duty as a Starfleet officer. (Star Trek Generations)
That same year, when an infant Jem'Hadar was brought aboard Deep Space 9, Benjamin Sisko got a look on his face that he hadn't had "since Jake stopped wearing diapers." Jadzia Dax listed the things that Sisko didn't miss about Jake being a baby "listening to him cry, changing his diapers, worrying when he was sick," but Sisko still found himself nostalgic for those times. (DS9: "The Abandoned")
In 2373, when Constable Odo initially declined assistance raising a newfound infant Changeling, Captain Sisko reminded him that it was "always nice to have someone around to help change the diapers." (DS9: "The Begotten")
In 2378, Harry Kim gave Tom Paris and B'Elanna Torres a diaper with a Starfleet emblem embroidered on it as a gift for their baby shower. Kim claimed that garment was "standard issue." (VOY: "Human Error") Later, while contemplating their future following their return to Earth, Torres figured that Paris would probably take the first piloting assignment that came along and leave her home to change the diapers. (VOY: "Endgame")