(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)
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")