To expand on an engineered solution with specs as I hinted in comments.
As most know by now show me a good product and it will have great details in the datasheet. Likewise for DIY projects. The better you measure what you want, and tolerate, the better the outcome. Otherwise, it's trial and error (repeat).
Here are some examples of the illuminance provided under various conditions:
Illuminance
[lux] Surfaces
======== =============================================
0.0001 Moonless, overcast night sky (starlight)
0.002 ..... Moonless clear night sky with airglow
0.05–0.3 Full moon on a clear night
3.4 ..... Dark limit of civil twilight under a clear sky
20–50 Public areas with dark surroundings
50 ........... Family living room lights (Australia, 1998)
80 Office building hallway/toilet lighting
100 .......... Very dark overcast day
150 Train station platforms
320–500 ...... Office lighting
400 Sunrise or sunset on a clear day.
1000 ......... Overcast day; typical TV studio lighting
10,000–25,000 Full daylight (not direct sun)
32,000–100,000+ Direct sunlight
Log Light Sensor

Just using a load resistor defines the voltage.
Then decide if you want to measure it with an ADC or use a precision comparator with a band-gap Vref or just use a 3.3V logic IC and rely on Vdd/2 or add % hysteresis. Add a cap to filter flashes of light or darkness etc.
You define how you want it to behave or not misbehave. ;)
Cheap, easy to use and accurate
and designed long ago by the best in the industry

Then Sharp licensed the designs to Vishay, now packaged on a PCB by Adafruit

Pick your target level lux, then voltage threshold then R.
Don't forget to not have the light near the sensor or it may toggle on and off.