Electrolysis of water involves the splitting (lysis) of water molecules using electricity.
$\ce{2H_{2}O(l) \rightarrow 2H_{2}(g) + O_{2}(g)}$
From the above equation, we see that the production of hydrogen will occur twice as fast as oxygen (on a volume basis). The electrode materials must be inert (non-reactive with water or its constituents). Platinum is good but very expensive, so titanium and/or nickel alloy catalysts are sometimes used. The current flows into the anode where oxygen gas is produced, whereas hydrogen gas is produced at the cathode. Generally, the higher the current, the higher the rate of production of hydrogen gas.
Since this is not a spontaneous reaction, energy is required from an external source in order to drive it. This is provided by a direct current (DC) electrical power supply, such as a battery or solar cell. The amount of energy required can be determined from the Gibbs energy of formation of water, which is -237.2 kJ/mol (at 298.15 K or 25 °C).
The theoretical minimum voltage needed for the reaction to occur is the standard electrode potential of oxygen, which is +1.23V. In practice, a slightly higher voltage (about 1.48V) is needed because of an over-potential of about 0.25V which is used up as heat.
Pure (demineralised) water can be expensive and has very low electrical conductivity, so some impurities in the water are desirable. Salt (sodium chloride) dissolved in the water will increase its conductivity dramatically, thereby reducing the current necessary to produce a produce hydrogen at a given rate. However, the chlorine gas can be produced at the anode (instead of oxygen) which is highly corrosive and hazardous. Minerals such as magnesium or calcium (present in sea water) will form insoluble precipitants on the cathode which could build up a 'passive' layer, reducing the rate of hydrogen production. Some acids or bases such as sulfuric acid or sodium hydroxide are therefore sometimes preferred.