Primary Production
Hydrogen can be produced from renewable and non-renewable primary sources. While production from renewable sources is in early stages of development, non-renewable sources have been used for many years and remain the most cost-effective and common method of hydrogen production.
The carbon dioxide released by renewable primary sources is in a constant cycle with carbon dioxide taken up by renewable sources while carbon dioxide released by non-renewables represents the accumulation of carbon by organisms living millions of years ago. Thus, in addition to higher sustainability, renewable sources have a greater compatibility with the environment than non-renewable because they do not contribute to the total amount of carbon dioxide in the atmosphere.
On the other hand, non-renewable sources tend to have a higher density of hydrogen than renewable sources. Both non-renewables and renewables arise from the chemical modification of organic matter, but non-renewables, such as oil, coal and natural gas, result form the exclusion of oxygen over millions of years. In the basic formula for organic matter (CH2O), Oxygen constitutes one-fourth of the molar density but over half the weight.
Non-renewables also have an advantage of experience. They have been used extensively in modern industrial societies to produce hydrogen for the manufacture of fertilizers.
Non-Renewable Primary Sources
The most common method of hydrogen production involves the formation of syngas from fossil fuels. Syngas is produced through steam reformation of methane or coal. In fact, this is the most common way of producing hydrogen in today's economy. The combination of methane steam and oxygen leads to syngas, which consists of carbon monoxide and hydrogen gas (2).
C(s) + H2O(g)→ CO(g) + H2(g) (1)
CH4(g) + H2O(g) →CO(g) + 3 H2(g) (2)
The syngas mixture of carbon monoxide and hydrogen undergoes the water-gas shift reaction to separate the carbon monoxide from hydrogen.
CO(g) + H2O(g) →CO2(g) + H2(g) (3)
From here, the carbon dioxide can be dissolved by sodium hydroxide to produce pure hydrogen:
CO2(g) + 2 OH(aq)→ CO3(aq) + H2O(l) (4)
Alternatively, the syngas mixture can be used to produce methanol, which is useful for methanol micro fuel cells in portable electronics:
CO(g) + 2 H2(g) →CH3OH(l)
If the carbon monoxide is combined with water, even more hydrogen can be extracted. Overall, this process yields four moles of hydrogen for each mole of methane. By weight, the yield is about 25% of the methane weight.
Another source of improvement is the need for pure oxygen. This requirement consists of about 40% of the total cost of hydrogen production. The incorporation of ceramic membranes which can allow partial oxidation of methane and extraction of oxygen from the air in separate chambers could substantially increase the cost efficiency of production.
Hydrogen gas can be extracted from biomass through fermentation.
Biomass is defined as a renewable resource made from renewable materials. Examples of biomass sources include switchgrass, plant scraps, garbage, and human wastes.
This fall florage could be a possible energy source for hydrogen production.
Fermentation uses bacteria to process organic matter and water into hydrogen. There are two types of fermentation: photofermentation, which requires light, and dark fermentation, which does not need a light source. Fermentation processes can use many carbon sources, including waste materials.
Non-photosynthetic organisms get their energy from glucose. If an organism uses oxygen, the glucose will be used through respiration. If the organism is anaerobic, the glucose will be used through fermentation. Pyruvate is first made from glucose. Then, the pyruvate can react further. One of the more familiar fermentation processes is alcoholic fermentation. In this process, pyruvate, an intermediate, produces ethanol and carbon dioxide. However, other fermentation processes can produce molecular hydrogen.

Source: http://chem.ch.huji.ac.il/~eugeniik/biofuel/biofuel_cells2_1.html
Dark fermentation is one process being explored for hydrogen production. In this process, pyruvate reacts to form acetyl-CoA and carbon dioxide. In this reaction, ferredoxin acts as the oxidizing agent. In the next step, ferredoxin is oxidized back to its original form, and molecular hydrogen is formed. The net reaction is:
C6H12O6 + 2H2O → 2CH3COOH + 2CO2 + 4H2
Or
C6H12O6 → CH3CH2CH2COOH + 2CO2 + 2H2
These hydrogen yields are the ideal yields, and actual experiments have given lower yields. This is because often the hydrogen is recycled in cells. The amount of hydrogen produced from this fermentation reaction is too low to make sense economically.

A promising microbe (Clostridium acetobutylicum)
Source: http://chem.ch.huji.ac.il/~eugeniik/biofuel/biofuel_cells2_1.html
However, attempts are being made to increase the hydrogen yield. Some methods would involve genetically modifying the fermentative bacteria. These modifications could include overexpression of the enzymes that produce glucose from more complex carbohydrates, or eliminating the enzymes that uptake hydrogen. Another issue is that acids are produced during fermentation, which decreases the pH in the organism. If the pH gets too low, bacteria will try to reduce the concentration of H+, and they will not produce H2. Therefore, bacteria that can function at lower pH could have a higher hydrogen yield, or the reactions that produce the acids could be blocked.
Photosynthetic bacteria also produce hydrogen from small organic acids. If these bacteria are combined with fermentative bacteria, the fermentative bacteria could produce the small organic acids, which the photosynthetic bacteria could then use. Since photosynthetic bacteria get energy from light, they are capable of undergoing reactions with higher energy barriers, so can get a higher hydrogen yield.