Even if, with the aid of electronic engine controls and efficient catalytic converters, a hydrocarbon fuel is burned completely to water and carbon dioxide, there is now growing concern about carbon dioxide as a greenhouse gas. Measures to cut back on production of carbon dioxide by automobiles without sacrificing performance can focus on efficiency, i.e., getting as much useful propulsive power out of a given amount of fuel as possible, which typically involves replacing the traditional drivetrain of a piston engine driving the wheels through a gearbox with a more efficient design.
However, some fuels inherently produce less carbon dioxide when burned completely than gasoline or diesel fuel. For example, counting the numbers of oxygen atoms it takes to burn up an isooctane molecule and a methane molecule (typical of gasoline and natural gas respectively), one can calculate that 100 oxygen atoms will combine with four isooctane molecules to produce 32 carbon dioxide molecules and 36 water molecules, while the same number of oxygen atoms will combine with 25 methane molecules to produce 25 carbon dioxide molecules and 50 water molecules. That is, a given amount of air (oxygen) will produce about 25% less carbon dioxide if used to burn natural gas than if used to burn gasoline. (Of course, this advantage will be reduced if you have to open the throttle wider and burn an additional amount of air with natural gas to get the same amount of power, but in the real world the 25% figure turns out to be about right.)
The other thing to consider is the source of the carbon in the fuel; if it came from the carbon dioxide in today's air to begin with, like an alcohol fuel produced by fermenting biomass (as opposed to a fossil fuel, whose carbon came out of the air when the dinosaurs were around!), then returning it to the air now adds nothing to the net flow of carbon dioxide into the atmosphere. Alcohol fuels or biodiesel produced from plants, when burned, just return to the air the carbon dioxide that those plants took out of the air while growing.
Finally, there's one fuel that, in itself, produces no carbon dioxide at all
when burned, namely
hydrogen; there's no carbon there to produce carbon dioxide!
Of course, since free hydrogen molecules don't occur in nature, it is typically produced by "reforming" a hydrocarbon or alcohol fuel or by using electricity to split water into hydrogen and oxygen. Then the size of the contribution of hydrogen fuel to carbon dioxide emissions depends on the source of the hydrocarbon fuel that was reformed or the source of the electricity used to split the water.
If a fossil fuel was the ultimate source of the energy that is, in effect, stored in the hydrogen, then you can still gain a large improvement in carbon-dioxide production if the hydrogen is used in an efficient drivetrain, as noted above; the same is true for the electrical energy stored in a battery-powered electric vehicle. In order to obtain the full benefits of reduction of carbon dioxide (or of ordinary air pollutants like carbon monoxide), of course, the energy used to split the hydrogen or charge the battery can be obtained from a renewable source like wind power or photovoltaics.
The nice thing about hydrogen- or battery-powered vehicles is that they can run on whatever is available--efficient natural-gas-burning powerplants today, with an increasing contribution from renewable energy as time goes on and the price of photovoltaic cells (solar cells) and other renewable energy sources continues to decline. As renewable energy becomes an ever larger part of the power generation mix over the next few decades, hydrogen- and battery-powered vehicles can switch over to the new power sources without a hiccup--it's all electricity to them!