They don’t actually detect the sun going down– they can just read the current time and sunrise and sunset time off the Network and turn on or off accordingly. The colonies of Luna Minor run on Kyogawa Standard Time, so they’d just light up whenever the sun sets in Kyokan, which roughly corresponds with the day/night divide the colonies observer to prevent everyone from going crazy.