The lighthouse is a special feature that allows you to toggle day and night on your farm. Every 12 hours, you can make it be nighttime on your farm for 15 minutes. Certain crops (such as mushrooms and eggplants) can only be planted at night.
At level 20, you can unlock the lighthouse by clicking on the floating lighthouse just outside your farm:
Unlocking the lighthouse costs 30 Diamonds.
Once unlocked, you can activate night mode every 12 hours for free by clicking on the "Activate Night" button in the lighthouse interface:
If you want to toggle nighttime more often, it will cost you 10 Diamonds every time.
At night, you can grow different plants than you can during the day:
It only matters for sowing the seeds though - you can harvest your finished crops at night or during the day!