The amount of time your garden should be exposed to lighting depends on what 'cycle' your garden is in:
The 'Vegetative Cycle' of your garden starts with the sprout of the seedlings and can be continued indefinitely. In the veg cycle your garden will require a minimum of 16-18 hours of light and 6-8 hours of darkness daily. Since a given amount of light can only do so much, equal production can be realized in a smaller space with less plants, where the light is concentrated and the plants can grow more efficiently. Using more light helps additional co2 uptake.
Since a plant can be kept in the 'Veg cycle' indefinately, many growers cultivate 'Mother' plants. This plant is used for clone starts and never produces buds, only new growth.
The 'Flower Cycle' or 'Bud cycle' is typically equal amounts of light and dark, 12 hours on, 12 hours off or 12/12. This produces a change in the plants metabolism simulating Fall, shorter days....less light.
This is the cycle that the plants will show their sex. Usually, you'll be able to determine the sex within the first 2 weeks of 12/12. By the 3rd week most plants have developed healthy bud sites or pollen sacks.
The plants will continue on the 12/12 cycle until harvest.
When someone 'Re-vegges' a plant that has been in the flower cycle, they're switching the light cycle back to 18/6 to stimulate new vegetative growth.