Why does diesel have a higher energy density than gasoline? One of the primary reasons why hydrocarbons produce energy is the production of water during the combustion process. 

I've been trying to find out why diesel is considered to have a higher energy density compared to gasoline and I can think of a couple of reasons: 


Higher molar mass (more carbon/hydrogen to burn) 
Easier to burn diesel since it is heavier (weaker bonds) 


I think I'm on the right path but I don't have a clear picture of the situation.
Diesel and gasoline have roughly the same energy per unit mass (lower heating value), about $41~\pu{MJ/kg}$).

The density of diesel is about $833~\pu{kg/m^3}$ compared to $740~\pu{kg/m^3}$ for gasoline. This gives diesel about 13% higher energy density per volume.