Commuter trains are already somewhat eco-friendly by their nature (you're less likely to need a car, after all), but the San Francisco Bay Area's train system is taking things one step further. BART (Bay Area Rapid Transit) has unveiled a policy that will gradually move it to completely renewable energy. It starts off modestly by limiting CO2 emissions now through 2024, but the plans will be more aggressive after that. At least half of its energy will have to come from renewable sources by 2025, with 90 percent of it from low or zero-carbon sources. All of it will have to be zero-carbon by 2035, while complete reliance on renewable sources would come by 2045.
This isn't exactly an overnight revolution, then. However, BART notes that it would actually outperform California's plans for a standard of 50 percent renewable energy use by 2030. Also, any improvements will likely make a tangible impact on the state. BART uses more power than the entire city of Alameda (over 400,000MW/h per year) -- even that 2025 target might help a lot. It's also important to note that BART expects to run both trains and its infrastructure on green energy sources. The area's Caltrain service has already made its own pledge to use renewable energy, but it's still using diesel trains where BART's vehicles are completely electric.
Only some of this will come through in-house energy generation (primarily through solar power), since BART just wouldn't have the capacity to meet all its own demand. Most of it will come by purchasing energy from the grid. There will be a certain point at which you can ride the train largely guilt-free, however, and whatever BART accomplishes might help other transportation networks achieve their own renewable energy goals.