Efficiency of Internal Combustion (gasoline and diesel) Engines
A starting point for this discussion is the wiki page for internal combustion engines and their efficiency. What is helpful to note in starting is that there is a theoretical maximum which is determined by the temperature at which you burn the fuel to extract the energy and the temperature of your exhaust gases. The extraction temperature is limited by the material you make the engine out of and the trade off between hotter tempertures for steel engine blocks and the lower weight (and temperature) of aluminum blocks. For our purposes it is most useful to think in terms of 35% as being close to the maximum possible efficiency for the sort of engines we currently use in transportation. The actual efficiency is closer to 20% for most gasoline engines in real use. The arguments about the relative efficiency of diesel engines are endless because it is difficult to make an "apples to apples" comparison. We should probably accept the idea that diesel engines are slightly (not dramatically) more efficient at converting the energy in the fuel into useful work but some of that gain is lost due to the heavier engine that is required.
Electric motors are generally very good (90% and better) at converting the energy put used by the motor into useful work (like moving a car down the road). You can read the wiki article to get an idea about how efficient modern motors are. A typical car motor would be in the 50 -100 kW range. (75 kW is 100 horsepower). You are no doubt thinking that this raises the new question of where is the electricity to charge the batteries coming from. At this time the electricity would normally come from coal or natural gas driven power plants. ...and their efficiency is.....
Here is a link to a comparison of different power plant efficiencies. You will see if you do the numbers that they are better than cars (since they don't have to go anywhere and can be run at higher temperatures) but it isn't that much better. Typical efficiencie are 30-35%. You will be asked what this means about the wisdom of converting to electric cars before we have a renewable way to make electricity.