Chlorine reacts with moisture and forms hydrochloric acid and hypochlorous acid.
Cl2+H2O→HCl+HClO
Hypochlorous acid (HClO) is unstable, so it breaks down into HCl and nascent oxygen [O]
HClO→HCl+[O]
The nascent oxygen is a powerful bleaching agent and is responsible for the bleaching action.