If valence electron is 1, atom will gain 1 electron(in case of hydrogen) to complete its duplet to obtain stability. Atoms gain, lose or share electrons to gain stability. Every element tries to attain its nearest noble element. Example : He is the noble gas element with 2 valence electrons(stable in nature) whereas H(non-metal) has only 1 valence electron so it'll form electron bond with that element which requires 1 electron to complete its octet or duplet(2 valence electrons, ex: He). Whereas in case of metals with 1 valence electron(example : Na), it'll lose to gain the nearest stable octet i.e Ne. Metals lose electrons because electrons are loosely bounded in them whereas non-metals gain electrons gain electrons. Halogen group have 7 valence electrons hence they'll accept 1 electron to complete their octet and attain stable nature. Hope this helps!