Please help to set up the lights through the toolbar

I ask for the help of modders who rummage around in the modeling and map settings. My question is how to script a certain number of lights so that they turn off the lighting effect during the daytime, and turn it back on at sunset so that it stays on all night. Thank you in advance.