Yes, if the Earth were a ball (which it is), lighthouses would still work. Lighthouses are designed to provide a visual signal to mariners, alerting them to the presence of land, dangerous areas, or navigational hazards such as rocks or reefs. The primary purpose of a lighthouse is to emit a bright, concentrated beam of light that is visible from a distance, guiding ships and boats safely through coastal waters or into harbors.
The spherical shape of the Earth does not pose a significant obstacle to the functioning of lighthouses. While the curvature of the Earth limits the visibility of objects at great distances, lighthouses are typically built on elevated locations such as cliffs, hills, or artificial structures to maximize their visibility. The light emitted by a lighthouse travels in a straight line until it is obstructed by the Earth's curvature or other obstacles.
Lighthouses are strategically positioned along coastlines, and their light beams are typically directed horizontally or slightly elevated to increase their range and visibility. As a result, even though the Earth is curved, the light emitted from a lighthouse can still be seen by ships approaching from a distance, allowing them to navigate safely.