Unless some totally reveloutionary, and as yet unheard of, power source becomes available in the very near future, I think it's inevitable that railways will eventually convert to "mains" electric power. Oil may last another 20, 50 or 100 years, but long before it runs out, it will become scarce and very expensive, and I don't beleive $40 a gallon is too fanciful.
The problems with alternative power sources, are that they are only supplementary, usually expensive, and still come with their own environmental impacts. In the case of hydrogen fuel cells, 95% of hydrogen is currently produced from natural gas, itself a diminishing resource, and requires vast amounts of energy. The energy losses involved in the process are also significant. Studies are being carried out of the feasibility (cost) of producing hydrogen by electrolisis from water, but at the moment, this process uses even more energy (electricity) and a by product of the process is CO2 in large quantities.
The future energy sources for railways and roads will, I think, diverge. While railways will probably change to electrification, road transport, cars in particular, will use varying methods depending on the use for which a vehicle is purchased. We're likely to see all sorts of niche markets, but the overall winner will be battery power. Having said that, battery technolgy has evolved very little over the last 100 years, and much improvement is required. This is where governments need to spend large amounts of R&D dollars. Electricity is relatively easy to generate using green methods, but that falls down when there is no cheap, reliable way to store it.
I suppose the ideal solution to our future power needs is for us to find a genie in a bottle and......aaah wait a minute.
Cheers