Halogens tend to have a high 'electronegativity' for their mass. This means that they have a strong tendency to pull electrons towards them. Sometimes, this tendency is strong enough to strip another element of their electrons, oxidizing it. Additionally, halogens tend to release a large amount of energy when an electron is added to their valence shell. Since systems usually trend toward lower-energy configurations, this often makes it favorable for halogens to strip electrons from other atoms.