Electric trains run off of electricity supplied from overhead cables or extra rails alongside the rails they travel on. However, this approach can get expensive, especially on long intercity routes with relatively little traffic. For that reason, North America has relatively little electrified intercity trackage; even many commuter railroads are non-electric.
Europe, by comparison, is much farther along in electrifying its railroads; not only intercity passenger trains, but also freight trains, are also electric. And parts of North America have population densities comparable to much of Europe.
Electric flat-road vehicles can be powered in the same fashion; electric trolleybuses, like
Though they are good in cities, it may be hard to justify the expense of their overhead cables for other places.
But carrying the fuel in the vehicle makes life much more difficult, as can be seen from the combustion-energy densities of various fuels:
Hydrogen: 121 kJ/g
Carbon: 32.8 kJ/g
Methane: 32.5 kJ/g
Gasoline: 25 kJ/g
(calculated from http://webbook.nist.gov/ - these calculations use only the fuel mass and not the oxygen mass. And n-octane (C8H18, straight chain) was used for gasoline.)
By comparison, batteries are much worse:
Lead-acid: 0.1-0.2 kJ/g
Nickel-cadmium: 0.15-0.3 kJ/g
Lithium-ion: 0.4-0.6 kJ/g
Reusable alkaline: 0.3 kJ/g
(from this "Battery University" page)
Which is why it is difficult to make an electric car that is much more than an electric golf cart.
Air travel would be especially hurt, since it dependent on high-quality liquid fuels like aviation gasoline and kerosene. However, sea travel would be less hurt, since it can use a variety of fuel sources. Older fueled ships used coal, while more recent ones use "bunker fuel" - what's left of crude oil after distilling off the lighter fractions.
Wind power has been used in aquatic vessels for centuries, but sailing ships' size is likely limited by the square-cube law (mass of ship ~ length^3, while wind force ~ sail area ~ length^2).
I will now turn to the question of the feasibility of solar-powered cars. A car that travels at 60 mph while consuming 20 mpg of gasoline releases gasoline energy at a rate of 70 kW (70 kJ/s).
By comparison, sunlight has an energy-flux density of 1.37 kW/m^2, so the car would need to have an area of 50 m^2 ~ (7 m)^2 facing the Sun.
So the only solar-powered cars to date have been very lightweight ones.
And similar calculations apply to solar-powered ships and airplanes.

