This required a clever design and one novel element.
The power for the light comes from the very bottom of the model where a battery box is stowed inside the mountain:

The wire leaves the mountain via the top and heads upward.

It then snakes its way around and up into the tower. Interestingly, the Powered Up lights include dual LEDs, as they are often used for headlights. Only one is needed for main light, so the other is used to add a glow to the woodstove in the cabin.

Up at the top, the light is attached facing upward underneath a construction that will be powered by the motor in the bottom of the lighthouse via a long vertical axle.

We need the light traveling horizontally, so we add a stickered mirror at roughly 45 degrees to vertical:

This would sort of work, but the light from the Powered Up LEDs disperses significantly and is not able to travel very far. In real lighthouses, a Fresnel lens if often used to appropriately direct the beam from a diffuse light source. The basic operation can be seen here:

TLG saw fit to create a Fresnel lens element to enhance the performance of this set. Here are some of the prototypes that folks iterated through:

The final version is a unique element with the footprint of a 2x4 plate. It attaches to our mirror assembly providing light that is now traveling in the correct direction and is more focused than it would have otherwise been.

This assembly is then attached to the top of the lighthouse and driven by gear so that it is able to rotate:

In this way, the mirror and lens assembly is able to rotate without the wired lights rotating and creating twists and tangles.
