The text plays on the literal meaning of darkness before turning on a light and the metaphorical saying 'It's always darkest before the dawn,' which means that things seem the worst right before they improve. The humor arises from the unexpected literal interpretation of a common metaphorical expression.
It is always darkest just before you turn on the lights .