Electric trains are pretty common in some parts of the world, it's just that the US has never bothered with it. And to be fair, diesel trains are already very energy efficient. I believe trains haul about as much cargo around as trucks do in the US on a daily basis, but the amount of fuel they consume is like a rounding error in comparison to trucks.
I think electrifying the trains is still worth doing, but if we want to reduce CO2 emissions and dependence on fossil fuels, it's not as important as getting those diesel-powered trucks off the road somehow.