Cockroaches only come out at night and avoid light. The light doesn’t hurt them, however, they seem to know they can’t hide from predators or avoid them if they are in plain sight. Although they will avoid light, leaving a light on or even a nightlight all night long will not drive them away.