The precise function of the pineal gland is not known in any detail. Evolutionarily, the pineal gland is derived from cells seen in lower animals that directly respond to light (so-called photoreceptors). In man (and other mammals) this direct connection has been lost, but as described in the anatomy section, there is an indirect connection. The pineal gland alters its activity in response to the state of light, as detected through this pathway. During darkness (i.e. night) it has an increased activity, where the hormones it produces are produced at an accelerated rate. Conversely during light (i.e. day) its activity is suppressed. (This daily rhythm is known as a circadian rhythm). It therefore appears that the gland has a major role in maintaining the circadian rhythm of the body.
The pineal gland produces a variety of hormones including noradrenaline, serotonin, histamine, dopamine, octopamine, luteinising hormone releasing hormone (LHRH), thyrotrophin releasing hormone (TRH), somatostatin and vasotocin. The main hormone produced and released by the pineal is melatonin.