I think that light only comes on if the tailgate glass is open. Do you know if the rear lights in the grab handles are on? If so then the bottom part of the tailgate, the gate itself is not closed well enough to fully engage the sensor. Try as Tom suggested and give it a good hard close and see if the lights go out. If they don't then I would start troubleshooting with the sensor.
If the problem is actually with the glass then you might have some dirty contacts. Try cleaning these and see if that helps. If it doesn't then you need to start troubleshooting the glass sensors.