A significant number of
Final Fantasy games feature trains in one form or another:
Final Fantasy I 'Dawn of Souls' - The GBA remake of the very first FF game featured the 'Phantom Train' monster from FFVI as an enemy to fight in one of the special areas.
Final Fantasy VI - features the 'Phantom Train', a ghostly train that transports the newly departed to the afterlife, which Sabin, Cyan and Shadow ride on (and have to fight the locomotive in order to alight from it - amongst other things it throws it's wheels at them!). The train in question is rather odd looking, with really antiquated carriages and a locomotive that appears to be a strange kind of articulated engine (like a Mallet).
Final Fantasy VII - the opening movie to the game features a streamlined steam locomotive hauling a train of tank wagons which Cloud and the AVALANCHE resistance group ride on. Cloud later dangerously jumps onto the roof of a moving passenger train from an overhead bridge in order to escape from the law, and ends up inside it.
An actual area of the city of Midgar is called the 'Train Graveyard', an appropriate name for a place that resembles a scrapyard with wrecked carriages and rusting locomotives lying forlornly everywhere. A later stage of the game features a runaway coal train, with Cid and his party having to fight their way along the train to the locomotive in order to stop it from crashing into a small shanty town at the end of the line (if you fail the train crashes in a spectacular movie scene).
Finally there is a strange cable car (which runs on rails at stations) which uses propellers for propulsion that runs to a large amusement park in the sky.
Final Fantasy VII: Crisis Core - appropriately for FFVII's prequel, the game's opening features Zack having to defeat a group of enemy soldiers who have hijacked a passenger train (identical in design to that from the original FFVII). Later in the game Zack can ride the same train between Midgar's Sector 1 Station and Sector 5 for free.
Final Fantasy VII: Dirge of Cerberus - Towards the end of the game, Vincent ends up in the ruins of the Train Graveyard area of Midgar from the original game, and has to dodge and weave his way amongst and through the wrecked carriages to avoid enemy gunfire.
Final Fantasy VIII - trains are a major form of transport in the game's world, with lines snaking all over the main continent, which Squall and his friends can ride for the not so low price of 3000 gil a ticket. There is also a scene where Squall has to switch a carriage carrying a VIP from a moving train and exchange it with a decoy, a completely ridiculous (not to mention impossible!) scene, but still fun nonetheless.
There is also a magic spell called 'Doomtrain' which summons a demonic train from the sky which runs down the enemy on rails of fire!
Final Fantasy IX - there is a funicular railway across a mountain range called the 'Berkmea Cableway', which Steiner and Garnet ride on (and which is attacked by a demonic magician during the journey). The city of Lindblum also features a rack subway giving access between the city gate and the harbour.
Final Fantasy XI Online - the Movalpolos and Gusgen Mines areas feature abandoned mine tracks and carts snaking through these areas, but they're not able to be ridden on sadly.
Final Fantasy XII - there is an area called Barheim Passage that was formerly an underground railway used for transportation, but was disused when air travel was invented, and has become derelict during the game.
Final Fantasy XIII - the very first part of the game features Lightning and Sazh hijacking a (diesel?) powered train taking unfortunate deportees to the world of Pulse as part of the 'Purge' (with the eventual result that the train becomes a complete wreck). Later in the game, the 'Fifth Ark' area features underground rail tunnels and derelict locomotives which resemble the train from the beginning of the game.
Incidentally, there was already a thread on this very subject, found here:
http://forums.auran.com/trainz/showthread.php?t=12843 but, but it's really old and probably no longer worth posting in.
