Secondary Production
Secondary methods transfer the energy from a renewable or non-renewable resource to produce hydrogen. Hydrogen is extracted from water in the following reaction:
H2O → H2 + 1/2 O2
Under normal conditions, the activation energy for this reaction is prohibitively high. As a result, hydrogen is rarely produced through the direct thermochemical splitting of water. Instead, electrolysis and thermochemical catalysis can produce hydrogen with far lower energy requirements.
Electrolysis
Electrolysis involves the flow of electrons from an electrical current input to the water molecule. In the electrolysis cell, there an electrolyte that allows the conduction of ions and a membrane that separates the reduciton and oxidation cells. The half reactions are:
2H+ + 2e- → H2
H2O → 2H+ + 2e- + 1/2 O2
One advantage of this process is that hydrogen gas and oxygen gas are produced in different cells, which makes collection of hydrogen gas easier.

Hydrogen could be produced from wind turbines such as these.
Source: http://www.ch2bc.org
Compared to hydrogen production from fossil fuels, electrolysis is much more expensive. However, the advantage of electrolysis is that it can use excess electricity that would otherwise be wasted during off-peak periods. For example, a nuclear power plant could use excess electricity and heat to produce hydrogen gas during times of low energy demand, such as overnight, and sell the hydrogen to distributors.
Photohydrogen Production
Many bacteria produce hydrogen gas naturally during their biological processes. Some bacteria make hydrogen gas through biophotolysis, which uses light to convert water to hydrogen. Two bacteria that undergo biophotolysis are green algae and cyanobacteria.

Cyanobacteria and green algae
Source: http://www.ch2bc.org
Green algae produce hydrogen through the action of a hydrogenase enzyme. The reaction proceeds as follows:
(1) H2O → 1/2 O2 + 2e- + 2H+ [photosynthesis]
(2) 2H+ + 2e- → H2 [hydrogenase]
Cyanobacteria produce hydrogen through the action of a nitrogenases enzyme. Unlike hydrogenase, the nitrogenase enzyme requires the presence of nitrogen and ATP. The reaction reduces protons as follows:
N2 + 10H+ + 8e- → 2NH4+ + H2 [nitrogenase]
Both proceses are sensitive to oxygen and generally proceed in anaerobic environments. However, the catalytic rate of the hydrogenase enzyme is higher than the rate of the nitrogenase enzyme and the hydrogenase enzyme does not require ATP to operate.

Schematic drawing of a future bioreactor for photohydrogen production. (adapted from Wünschiers and Schulz 1998) http://www.photobiology.com/photoiupac2000/wunschiers/index.htm.
The biggest challenge for hydrogen production from photobiological processes is that oxygen often poisons the bacterial systems. Until hydrogenases resistent to oxygen are discovered or developed through genetic engineering, the oxygen and hydrogen products need to be separated either temporally or spacially during the production process. One process under development uses bacteria which produces oxygen through photosnthesis in the presence of sulfur and hydrogen through a hydrogenase enzyme when deprived of sulfur.
Sources:
Ghirardi, Maria and Michael Seibert. "Algal Hydrogen Photoproducion." National Renewable Energy Laboratory. Program Review Meeting May 19-22, 2003.
Seibert, Michael et al. "Molecular Engineering of Algal H2 Production." NREL, 2002.
Wünschiers & Schulz (1998) BIUZ 28: 130-136.
.