Sadly much of Central America doesn't have a rail network of note. The exception used to be Mexico, which inherited rolling stock from the USA and used to have a service linking most cities. This too has largely been abandoned though, in favour of long distance buses and short flights.
The exception is the scenic Copper Canyon railway, which travels from Los Mochis to Chihuahua, connecting the Pacific Ocean to the central desert. The 400 mile journey passes through some of Mexico's most rugged terrain, hugging the edge of mountains and crossing deep ravines on its bridges, giving you an insight into this harsh, spectacular region.