If done properly, kept under control, well tested and not taken too far, pops and bangs are completely safe. In fact, many manufacturers offer pop and bang sounds as a stock feature for their cars and they come with regular warranty and safety claims. These include some of the most famous manufacturers such as Mercedes-Benz (especially for AMG cars), BMW and VW and other VAG models. So, yes, pops and bangs, if done right, are completely safe. Otherwise, they would hardly find their place in regular production cars.
Going too far can be detrimental to your valves, exhaust system and catalysts and in some cases even turbo. This is why a controlled pop and bang tune developed by experts is essential if you want to enjoy the awesome sounds and also keep the safety and reliability of your car.