Why Hydrogen can be placed in either group1 or group 17 in the modern periodic table?
Hydrogen can be placed in both group 1 and group 17 because its electronic configuration is similar to both the groups. Like group I elements, hydrogen has only one electron in its valence shell. Thus it can lose an electron to achieve a stable configuration like alkali metals and hence can be placed in group 1 (alkali metals).
However, like group 17 elements, it requires only electron to complete its valence shell, thus it can also gain an electron to achieve a noble gas configuration.