Our sun is the huge source of heat and light without which our earth would not be a habitable planet. One must spend get exposed to sun moderately in order to allow our body produce vitamin D. But too much exposure to sun has negative effects on our body. Our skin and sun are associated in a sense that the former gets a burn or a tan gradually while in the presence of sun.
Tan is nothing but a darkened skin color. The appearance of the skin or our skin color is determined by a group of pigments called melanin. The differences in skin color (dark brown to light pinkish white) in different people accounts for the different amounts of melanin produced in each person’s body. This melanin is produced by some special cells of our body called melanocytes. The melanocytes are found among the cells of the upper layer of the skin called epidermis.
When we are exposed to sun over a period of time, melanocytes start to produce melanin pigment in reaction to the sun’s ultraviolet rays. Thus these pigments are actually the reason for skin tan. The UV rays activate the melanocytes stimulating melanin production which takes some time. That is the reason why people don’t get tan in short amount of time.
There is yet another gland that helps in melanin production. The pituitary gland in the brain produces a hormone that stimulates the melanocytes. The hormone is called MSH (melanocyte-stimulating hormone) which encourages more melanin production. One thing that is noteworthy is that the pituitary gland can sense light which means sun can stimulate the production of hormone too.
People in the west intentionally tan their skin by sun bathing (exposing their body in the sun for some time) or using chemical products. Deliberate tanning using chemicals may cause tan without exposure to ultraviolet rays. Some may tan easily while some may not. This depends on skin type and genetic factor.