Light sensor detecting when the lights turns on AND when the light turns off
As Chris Stratton said in his comment:

By far the simplest circuit in terms of what you visibly construct would be a 6 or 8 pin MCU

And I fully concur. (The number of unused pins doesn't really matter for complexity, so use whatever MCU you have the easiest access to).
Typical Photodiodes (like this cheap INL-5APD80) have &quot;day&quot; photocurrents in the order of 10 to 100 µA.



simulate this circuit &ndash; Schematic created using CircuitLab
Your freedom lies in picking R1; the higher R1, the less light is enough to make V_meas high.
Note that your MCU allows you to be flexible there, if you configure it to attach its ADC to the GPIO1 pin. Then, you do things like &quot;if it's been really dark for a long time, we increase our sensitivity&quot;, because you're no longer triggering based on a fixed voltage level as if you were using GPIO1 as digital input.
The upside of using GPIO1 as digital input might be (depending on the MCU you pick) that you can send the MCU into the deepest of sleeps, and use GPIO1 changing state to trigger a wakeup, making this a relatively power-efficient circuit.
However, small problem here: Microcontroller (like this cheap STM32F0) have inputs that don't have infinite input impedance. (no problem here, the leakage current on datasheet page 72 is specified to be below 0.2 µA, so if your photocurrent is, say, 40 µA, you're pretty safe.)

If you need to sense things quickly on an ADC input, this can become a problem, and you'd need to add a voltage buffer (typically, made out of an opamp) to ensure things keep working; for really fast sensing, there's little way around more advanced amplifier designs (TIAs), but really, this is not your use case. You don't want to receive megabits per second with your photodiode.

Should you really want to go with Fredled's discrete logic approach, you can do it with a single XOR gate, and a delay.



simulate this circuit
XOR's output is high exactly iff one input is high and one is low.
You can adjust how long that is by twiddling the time constant of your low-pass filter (in green box).