The periods of light and dark are extremely important for fish, because this drives their circadian rhythm (as it does all animals including us) but with fish it is a major aspect of their stress and health because it affects their physiology and metabolism.
Presumably you have the tank lighting on for a period of hours each day for the plants. This is the "daylight" as far as the fish are concerned, whatever the light might be like in the room. It can be a period of say six hours up to eight, or sometimes a bit longer, but algae may become a nuisance if the lighting is on too long. And it must be in one period, remaining on for whatever number of hours; turning the tank lighting on then off then on again is bad for the fish.
There must be a period of several hours of total darkness, meaning no room lights outside the tank; this is the "night" to the fish and plants when they "rest up" so to speak. No "moonlight" tank lighting, just complete blackness. There needs to be several hours, and again in one period each 24 hours. For most people, this would probably be from 11 pm or midnight until dawn.
The period in between the "daylight" and "night" are comparable to dusk and dawn in the habitat, and these periods are not as important as the other two.