You need to connect the generator via anything in the Connectors & Switches section under Power in the Workshop build menu. Once you've got a switch or pylon in place, when you hover over it you have the option to Attach Wire:
Select this option and connect a wire to the generator and the light (or other object) and then flip the switch if required.
Additionally, some items appear to power just by being in the vicinity of power infrastructure (pylons, conduits, etc):