A very interesting video on work simulating combustion (in this case, in rocket engines). It focuses mainly on the computing techniques used, but if you take a look from about 41:30 to 42:30, it points out the complexity of the chemistry even in simple reactions like burning hydrogen or methane. There's a whole lot more going on there than hydrogen + oxygen => in the case of burning hydrogen, the reactions for burning methane are significantly more complex again, and I expect the equivalents for gasoline or diesel are downright scary.
Upshot being that there are a whole lot of intermediate reactions which could be tipped one way or another by a little extra hydrogen and/or oxygen in the mix - relative concentrations of intermediate species / reactants could have quite an effect on the reaction pathways. Apart from the chemical effects, hydrogen gas is a tremendous conductor of heat, a little free hydrogen in the cylinder could quite possibly help conduct heat away from hot spots or increase the speed of the flame front by thermal conduction. Without making any claims here (I have no data myself, nor any particular opinion at this point on whether 'HHO' devices are a good idea) it's certainly plausible that some effects here could help with problems of flame propagation, premature ignition, incomplete breakdown of the fuel, or incomplete combustion of the fuel or the intermediate chemical species in the reaction - all of which are known and accepted sources of inefficiency in an ICE (and of course, there's the reports that it helps with carbon build-up, though that's really more of a maintenance and tuning issue IMO).
It may be that adding 'HHO' helps with none of these, but dismissing the concept
just on the basis of trotting out some high school thermochemistry and stating "energy to produce HHO" + losses > "energy from burning HHO" (while true enough in itself, to be fair) is a bit silly. There are
lots of other ways this could be influencing the process.
GPU Technology Conference 2015