Welcome, Volmer!
Substances exist that change their state reversibly under sunlight. One example is the norbonadiene family that becomes quadricyclane under light, then reverts to norbornadiene more or less slowly.
Problem is "instantly". I don't see any spontaneously. Reverting to the ground state gets faster with a catalyst, but the excitation needs some amount of light.
An other difficulty is the change in properties. Between norbornadiene and quadricyclane, the change isn't spectacular.
Did you check the many sensitizers used in chemical synthesis? Things like acetophenone. At least, they absorb light well, and compounds exist for varied wavelengths. A table of absorption coefficients:
https://www.nist.gov/sites/default/files/documents/srd/jpcrd322.pdftheir excited state may have properties different enough, or they can transfer the excitation to an other compound. Would they colour a compound similar to phenolphthalein maybe? Or perhaps the excited molecule absorbs other colours of visible light.
At very high power density, dyes lose their absorption power and become transparent as they get saturated. This serves to make strong pulses at lasers. Could dilution or thinness reproduce this behaviour for light less strong, but still be initially dark?
Do you really need a chemical for your goal? I have a feeling that electricity is the way to go. To weld aluminium, I had an eyes protection mask whose photovoltaic cells made an LCD window opaque immediately.