According to the octet rule, if there is less than electrons in the valence shell of an atom of an element, then the atom is unstable. Chlorine has seven electrons in valence shell. Chlorine atom needs one electron to complete outer most shell or to become stable. Chlorine atom gains one electron to get the electronic configuration of nearest noble gas. To gain stability, chlorine atom gains an electron of another atom and makes bond. Moreover, chlorine atom combines with another chlorine atom to become stable and to form a diatomic molecule.