Makes me wonder if they named the prop wrong.
If you GIS around, it's almost certainly intended to be an arc welder. Generators are either bigger or show actual engine components while arc welders are boxy affairs like the game prop.
I suppose it's within the realm of possibility you could hook lights to an arc welder, I mean, it certainly cranks out a lot of current. But you'd probably blow out the bulbs instantly and set a bunch of stuff on fire. And if you have outlets to power a welding rig, why not just plug the lights into that?
But obviously that intent didn't survive the map designers. They needed to put lamps in a cave and wanted to power them somehow, and a nondescript metal box is the closest thing they had to a generator. I think they even put a sound entity there to make a generator noise.