Found this on another site. I guess it's a hormone called florigen. And I remember it had to build up to a certain level each night to trigger flowering, and that light interruptions lower or destroy all the hormones built up, I don't remember exactly but it's something like that.
Flowering Night Cycle
Definition - What does Flowering Night Cycle mean?
In cannabis cultivation, the flowering night cycle refers to the amount of darkness a plant receives. The flowering night cycle is an extremely important aspect of marijuana plant cultivation.
During the vegetative stage growers try to mimic the daylight hours and the night cycle of late summer to encourage flowering. Many set their grow lights to an 18 hour light cycle to encourage rapid and strong growth. Some growers even expose their plants to full light 24 hours per day for vegetative stages.
After plant growth is obtained, the plant is then exposed to shorter periods of light and longer periods of darkness to spur bud production and flowers. This is the flowering night cycle, and it is when the sought-after buds are produced. For flowering, the light cycle is reduced to a 12/12 cycle (12 hours of daylight, 12 hours of darkness) to mimic fall light patterns, where the days are shorter.
MaximumYield explains Flowering Night Cycle
The uninterrupted periods of darkness during the flowering night cycle are essentially instructing the plant on what to do in terms of bud production.
A plant's flowering is spurred by a flowering night cycle known as photoperiodism. The cannabis plant is considered a short-day plant because it requires an adequate flowering night cycle to produce buds and flowers. In its natural environment, the cannabis plant flowers at the end of summer when the nights grow longer.
The marijuana plant’s circadian rhythm is spurred by a hormone called florigen, which is released when the plant is exposed to longer nights. The hormone of the plant makes it exceptionally sensitive to the light/dark cycle. Uninterrupted periods of darkness trigger the hormone’s release.
To achieve optimal cannabis yields and induce flowering, the plant’s night flowering cycle should never be disturbed and no light should inadvertently leak into the grow room during the darkness hours.
This definition was written in the context of Cannabis