Basic hydrogen combustion - "burn" hydrogen and the product is water. Consider a hydrogen powered car. Water comes out of the 'tailpipe.'
I've seen hypotheses where the high energy 'storms' of early Earth had a component of hydrogen combustion giving off water vapor. As the Earth cooled, the remaining vapor condensed into seas and oceans.