To my understanding it imparts fear into a dying, viable plant whose only function is to reproduce. The dark is to send her into a panic that her life is ending before she's had the chance to be pollinated and therefore reproduce. It supposedly induces a response of further THC production from the plant so that it may make itself as large and sticky as possible so as to secure pollen. If in hydro, adding pH balanced ice cubes to the res is said to increase this response further yet.
The most potent time of the plants day is just before the lights come on. Each day as the lights are on the light will degrade and even evaporate some of the resin and THC. At night it rebuilds this back up. That is why you want to harvest after a night cycle with low intensity lights not the grow lights on. Harvesting an hour or so after high intensity lights hit the plant is just shooting yourself in the foot.
Many people believe a long night cycle adds to the resin and potency and to a point that must be true but I have not seen if it is peaked at 12 hours or 18 or 36... who really knows.
Also it depends on how much you have dried it out and how much and what way you have decided to flush the plant.
For best curing results and flavor you want the plant still living after harvest for a bit. Many people do things that bring it close to death including drying it out before harvest. Some people claim drying it out the last week helps increase resin production. I like to keep it watered to slow down the drying. I keep adding sugar water so as to aid in using up the last of the ferts and keep it going as long as I can after I cut them down. If done correctly it has been shown they will continue to push out some resin even into the first few days of drying and get even more potent in the dark still.
So I would definitely harvest at least after 12 hours of darkness. A very prominent member on here has a thread about how it doesn't matter but maybe they didn't do it right. I have not read it. I will do an experiment 2 or 3 grows from now to see for myself if I can tell...assuming I do the experiment correctly.
But I don't see any way it could hurt as long as you keep good airflow going.