WARNING: This page is about a different car, the 2007 Pontiac G5 Pursuit, 2007 Pontiac G5, and 2007 Chevrolet Cobalt. However, it is still accessible from the selected car via links, so may be relevant.
Fig 1: Sunroof Control Switch
Courtesy of GENERAL MOTORS CORP.
Install the sunroof control switch (2) to the bezel (1).
Connect the electrical to the switch.
Rotate the sunroof control switch and bezel into the headliner and press to engage the clips.