Variables in Blender

I am looking for a way to control multiple materials from a single master variable.
I have an airport scene, which I want to render at 2 times - day and night. I want a variable that saves this time, and for materials to adjust accordingly (lamps turn on, emission shaders turn on, compositor nodes change). Currently, switching time means changing materials for dozens of objects manually, as well as changing tge hdri lighting.

What is the best way to implement this? It has to be able to control something in material nodes, such as a mix node to change shader.

You can create a Node Group containing the variable and add this Group in multiple Materials. You then change the value inside the Nodegroup and it will change for every Material.

Node Groups in Cycles kinda work like functions in programming in case you are into that.

Another option would be Drivers

The material group works, thanks!
I had a look at drivers already, but the material method is way easier.