I don't think this will help you make water but it might help.
Now, the hydrogen and oxygen idea :
In theory such reaction may be accomplished , and would produce pure water. Moreover, ultrapure water (especially isotopically labelled waters for assorted scientific applications) is indeed produced in such a way, industrially. However , hydrogen does not come cheap. In order to obtain it, one would need to electrolyze some water or run some sort of a chemical reaction (such as H2SO4 + Zn for example) . Energy needed for electrolysis would be more expensive than obtaining water in some other way. Now,if we were on say jupiter, H2 may be more abundant but then , oxygen would be a rare commodity.
H2+O2 reaction produces lots of heat and if we could utilize 100% of it than perhaps electrolysis *may* become practical. Unfortunately, basic laws of thermodynamics do not allow this to happen. Hencforth we are stuck with using naturally occuring water and puryfying it as necessary - by distillation, dialysis or other means.
Hope it helps