Thomas Riker was created on a very hostile planet during an attempt to beam up William Riker in the narrow window that the planet's conditions allowed for transport. Dropped back onto the planet, Thomas Riker lived there assuming that his shipmates thought he was dead. He was rescued by the USS Enterprise, ironically by William Riker. He went on to serve in minor roles on other ships in the Federation fleet.
Joining the Maquis
Disillusioned by his life in his own shadow, Thomas Riker eventually left Starfleet and joined the Maquis. As an exact duplicate of William Riker, his biometrics allowed him to penetrate the security around the USS Defiant at DS9. Once on board he kidnapped Kira Nerys and faked a catastrophic system malfunction to steal the ship and and take it into the Cardassian DMZ to attack a secret Obsidian Order shipyard. He was tracked down and captured by Gul Dukat and Benjamin Sisko, after which he was sent to a Cardassian prison, where he presumably died during the Dominion War.