First, we have to locate the halogens in the periodic table. It is located at the group 17 (second from the right).
Valence electrons are the outermost electrons in a particular atom which is generally the electrons that participate in certain reactions. Halogens (Fluorine, Chlorine, Bromine, Iodine, and Astatine) have valence electrons of seven.
They belong to the p-group elements which mean that their valence electrons are the electrons present in the last s and p orbitals in the electronic configuration. Let us try to write down the electronic configuration of the halogens:
(Consider the bolded configurations)
F = 1s^2 2s^2 2p^5
Cl = 1s^2 2s^2 2p^6 3s^2 3p^5
Br = 1s^2 2s^2 2p^6 3s^2 3p^6 4s^2 3d^10 4p^5
I = 1s^2 2s^2 2p^6 3s^2 3p^6 4s^2 3d^10 4p^6 5s^2 4d^10 5p^5
At = 1s^2 2s^2 2p^6 3s^2 3p^6 4s^2 3d^10 4p^6 5s^2 4d^10 5p^6 6s^2 4f^14 5d^10 6p^5
All of them have the same valence electron configuration of s^2 p^5 or seven valence electrons.