His window just happened to be at the darkest part on the street where shady business could be done in the shadows. Drug deals, prostitution, etc. He'd overhear all of it because of the lack of light on the street by his window.
I don't remember exactly what the solution was but it involved getting the area lighted somehow.
Surely it didn't prevent the crimes from happening, just relocating it elsewhere.
But that's the point. As long as the paths people stick to at night are well-lit, they can avoid the dark shadows where crime is more likely occurring. If you leave entire blocks darkened, you make those blocks less safe. Stumbling upon a crime in-progress is a good way to get killed just for being a witness.