Each Hydrogen atom has 1 valence electron. Since Hydrogen can only fit a max of 2 valence electrons in its orbital, each Hydrogen atom only needs 1 electron. Each atom has 1 valence electron, so they can just share, giving each atom two electrons each.