Light emission due to discharge in air is detected during and after the detachment of microstructured PDMS samples from glass surfaces, showing contact charging of the surfaces. The light emission provides information about the detachment process, like the velocity of the peeling front, which is difficult to obtain otherwise. While the work of separation exhibits the dependence on pulling velocity typically found for viscoelastic materials, the emission intensity exhibits almost no velocity dependence. We present a model for the rate-dependent contribution of a mosaic of contact charges to the work of separation. Also, the work of separation increases as expected with increasing aspect ratio of the microstructure, while the emission intensity shows a maximum for intermediate structures. Based on their different dependencies and on an upper-bound estimate of the energy emitted as light, we conclude that for the given system the contribution of electrostatic attraction to the work of separation is minor.