Throughout the life of the plant until it's ripe. Use a loupe to determine ripeness. Search for Loupe harvest on this site for instructions to determine peak harvest time. Once the trichs turn dark amber they are on the decline in potency. Best time to harvest is right before lights on. That is when the plant is at it's most potent state. This is according to Mel Frank in his book "Deluxe Marijuana Growers Guide (revised color edition)"
THC is produced beginning almost at germination. It is present on every leaf of both male and female plants. During flowering
Roughly the same amt of THC is contained in a big leaf as a bud hair (a bud hair is a modified leaf). When you're smoking bud, with all those small leaves/hair, you get higher than when smoking leaf because of the concentration of THC. A bowl load of bud can contains 50 times more THC than a single leaf.
And when you make kif/hash, the THC percentage goes up even more, because you've screened out even more of the plant material. The strongest THC concentration can be found in honey/hash oil which contains close to zero plant material.
P.S. There are other components in marijuana leaves besides THC that get you high. About 2 dozen I think. That's why a weed high is different from a hash high.
There are different cannabanoids in all different strains and even within the strains there are phenotypes. This is why some plants kick your ass and pass you out and others cause laughter or the munchies or cottonmouth. The different cannabanoids and the different levels of them react differently with the different ammounts of THC. Thats why all highs are different essentially. Remember its not just the THC that make you high, some plants with high percentages of THC can have poor effects and vise versa low levels of THC can kick your ass to the couch. This doesn't exactly answer the question but its some imput that is somewhat relevant to the topic.