Yes, if carried out by a trained dental professional. Whitening uses a peroxide-based gel to lighten the teeth. When these chemicals break down, they release oxygen. This gets into the hard, outer surface of your teeth (the enamel) and whitens them.
It is a safe procedure if treatment is carried out by a dental professional who is registered with the General Dental Council. This way you can guarantee the products you are using are safe and legal.