An example of a script that specifies the material parameter is Emit, for those who bake the lighting map, and if you need to turn off the light, or turn ON.
A second example is a cyclic flashing of a baked texture.
cycle daily, probably not, change the color - yes.This is a technique for static needs and Low-performance computer, or mix both options - a baked map, and dynamic shadows.
Theoretically, you can bake the shadows separately in a script in several positions and change them - but this technique is not for this. This is for high-quality graphics on Low-performance computer.
Even modern games sometimes use two methods, and not all need a daily cycle - there are already other system requirements.