In no way can
electrolysis be used to produce
energy. During any conversion of energy, there is a loss
of energy to heat. The production of Brown's Gas, HHO,
Oxy-Hydrogen, and pure hydrogen is done via electrolysis therefore the energy contained within
each gas is less than the energy used to create it.
Just because electrolysis cannot produce energy dousn't mean the electrolytic decomposition of water is a futile notion.
The decomposition of water, by electrolysis, has two primarily viable applications: carbon fuel enhancement,
and torch use. Note that these applications are viable specifically in consideration of the monetary cost of electrical requirements.
Automotive fuel enhancement is especially viable and
the best means of comprehension is explained here.