A study from U.C. Berkeley researchers looks at the whole panoply of environmental impacts of various modes of transport, including raw materials extraction, manufacturing, construction, operation, maintenance, fuels and much more.
We present results of a comprehensive life-cycle energy, greenhouse gas emissions, and selected criteria air pollutant emissions inventory for automobiles, buses, trains, and airplanes in the US, including vehicles, infrastructure, fuel production, and supply chains. We find that total life-cycle energy inputs and greenhouse gas emissions contribute an additional 63% for onroad, 155% for rail, and 31% for air systems over vehicle tailpipe operation. Inventorying criteria air pollutants shows that vehicle non-operational components often dominate total emissions. Life-cycle criteria air pollutant emissions are between 1.1 and 800 times larger than vehicle operation. Ranges in passenger occupancy can easily change the relative performance of modes.
In other words, how many people a vehicle carries matters crucially to the environmental outcome. Most urban rail transit systems don't carry enough people to be greener than cars. Diesel buses running empty are horrible, but when full they are pretty darn green.