Depending on the site of colonic perforation, air from the insufflated bowel can enter into either the peritoneum or retroperitoneum.
1. If air enters the peritoneum, gas can traverse from here through small fenestrations in the diaphragm and enter the pleural space along a pressure gradient causing a pneumothorax. Aside from minute diaphragmatic fenestrations, there is a subset of patients who have undiagnoosed diaphragmatic defects which allow the direct transmission of air into the thorax.
2. If air enters the retroperitoneum a pneumomediastinum can ensue through direct communication.
Source
Zeno, B. et al. "Tension Pneumothorax Following Colonoscopy" Chest. Oct 2005. Supplement.