A T-shirt was a type of clothing, typically a short sleeved, buttonless, collarless garment which is pulled over the wearers head to cover their torso. Many T-shirts sported designs or slogans, making the simple item of clothing an ideal way to display the wearers personal tastes.
In 2255, in an alternate reality, Cadet James T. Kirk had an Iowa Hawkeye T-shirt in his possession at Starfleet Academy. The Vulcan cadet T'Laya wore it as a nightshirt on the morning after their first night together. (TOS - Starfleet Academy novel: The Gemini Agent)
In 2285, Hikaru Sulu wore a Filipino T-shirt while privately contemplating whether to accept Starfleet's offer of Command, or aid Kirk in hijacking the Enterprise to rescue Spock. He did so while exercising and performing martial arts at his home on Earth. (TOS novelization: Star Trek III: The Search for Spock)
In 2370 Garak sold "I Saw The Prodigal" T-shirts from his shop on Deep Space 9, as souvenirs for the Illumination of The Prodigal which was drawing visitors to the station. (DS9 novel: Devil in the Sky)