hydrogen resembles halogens in the periodic table because it shares its properties with halogens in the field of sharing or gaining electrons or in other words it has its electronic configuration similar to helogens. That is why its position in the periodic table is not justified.
Hydrogen (1s1) shares the similar electronic configuration with halogens where both of them require to gain only one electron to obtain the stable state configuration. Eg:
F : 1s 2 2s 2 2p 5
Cl : 1s 2 2s 3 2p 6 3s 2 3p 5
So, we can see that according to this electronic configuration, both hydrogen and halogens require to gain only one electron to acquire the stable duplet(for hydrogen) and octet(for halogens) states or a uni-negative ion.
Regards.