The optimal time to harvest cannabis plants is when THC production has reached its maximum. A rough guide as to when to harvest is to wait until 50%-80% of the white pistils (hairs) have turned dark (usually brown or red). But a better method of determining when to harvest is to wait until certain trichomes on the plant have matured.
Trichomes are small appendages that look like hairs, they are produced by cannabis and other plants. Some trichomes on marijuana plants develop a resin gland at the top. These trichomes are a rich source of THC, and monitoring them will allow you to best judge when the plants are ready for harvesting.
On cannabis plants, trichomes with resin glands form in the highest concentration on buds. They start out clear, turn a milky color, then turn amber (light brown). To best judge when to harvest, wait till about a week or two before the expected harvest time (just before you go to water only feeding) and look at the trichomes on the largest buds on each plant daily.
The best time to harvest a cannabis plant is when a majority of the trichomes have turned to a milky translucent color. See these images of what trichomes look like and what color they should be at harvest time. Not all the trichomes will mature at the exact same time, so harvest when most of the plants are ready. Or harvest each bud separately.
It is nearly impossible to see the trichomes with the human eye, so some type of magnification is needed. An inexpensive way to effectively view them is to use a pocket microscope rated at somewhere between 20x to 70x.
There is another type of trichome that can be found on marijuana plants, they are called cystolith trichomes. This type of trichome is mainly found on the underside of leaves. They look like small hairs with no resin gland at the top. Cystolith trichomes are not a source of THC.
When grown indoors, most marijuana strains will be ready to harvest 7-12 weeks after starting a flowering light cycle (12 hours on and 12 hours off per 24 hour period). Most mainly indica strains will be ready to harvest in 7-9 weeks. Mainly sativa strains can take up to 12 weeks to reach maturity.
You can harvest the plants by cutting them down at the base of the stem (with a pair of scissors or some other type of cutting tool), just above where the plant meets the hydroponic media or soil. This will allow you to harvest the entire plant at the same time. Alternatively, you can wait for each branch to mature and cut it off separately.
If you are a spiritual person or feel a connection to living beings, offer a prayer of gratitude (and thank the plants themselves), before cutting the plants down. You can do this silently, if you feel more comfortable doing so.
Once you have grown a strain, you will be able to better estimate the best time to start giving it distilled or reverse osmosis water to flush nutrients, and when to harvest future crops. Indoors you can be pretty sure that a strain will be ready in the same amount of time, if you provide the same conditions each time you grow it.
Indoor growing conditions will remain constant, unless you change something. When you grow outdoors, you can not assume that a particular strain will be ready in the exact same amount of time, each time you grow it. This is because you are not able to provide consistent conditions outdoors.
After the marijuana plants have been harvested, they must be manicured and dried. Manicuring and drying the marijuana harvest is a very important part in the cultivation process. You may want to smoke the marijuana you have grown without waiting, but this is not a good idea. See this for information about manicuring, drying, and curing marijuana.