The best available battery techs (generally metal-air designs which consume the anode) offer about 1/10 the energy storage density of liquid hydrocarbon fuels. The best of these, lithium-air, offers a theoretical maximum of 11140 wH/kg (40 MJ/kg), excluding oxygen weight, which is actually close to that of gasoline, diesel, or fuel-oil (~46 MJ/kg).
But at practically attainable levels for rechargeable designs, you're down to 9 MJ/kg, and on a gross energy-density basis, while sufficient for some uses, including a fair number of ground-transport uses, but with some significant operational and technical constraints imposed by the battery's own operation. You also have the further disadvantage of having to carry around the full weight of the battery even when its energy content has been exhausted (fuels by comparison are burned off).
For other uses, particularly large bulk-good transport (ground or sea), or practical heavier-than-air craft, it's simply not good enough.
And that's the best possible designs. For more viable designs -- LiON or even hypothetical graphene / carbon nanotube batteries, you're looking at vastly lower storage densities -- 0.36–0.875 MJ/kg for LiON.
The prospect of synthesizing hydrocarbons using electrical energy from renewable or sustainable sources strikes me as a highly probable future path, though I'm partial to the US Navy's fuel-from-seawater proposals, given the much higher (140x) concentrations of CO2 available in dissolved and bound (carbonate, bicarbonate) form. For more: http://redd.it/22k71x
For discussion of energy storage see generally Wikipedia:
https://en.wikipedia.org/wiki/Metal%E2%80%93air_electrochemi...
http://techland.time.com/2013/05/23/amprius-begins-shipping-...
This compares with 10,690 WH/l for liquid hydrocarbons (scaling a barrel of oil equivalent to liters and converting to watt hours).
That's roughly 5% the energy storage density of liquid fuels.
In 5 years, people will laugh at the idea of using compressed air instead of just storing electrons. I imagine battery energy density will have doubled by then.