Skin pigmentation arises due to irregular deposition of melanin in the skin. This may be genetic or activated by external and more controllable factors. Melanin is deposited in the skin by melanocytes. The health of melanocytes is key to almost all pigmentation concerns, which can be broken into hypopigmentation (light patches) and hyperpigmentation (dark patches). The patches may be large (e.g., vitiligo) or they may be barely perceptible.
There are more than 70 different pigmentation disorders. Medication, reaction to chemical exposure and hormonal changes can be initial triggers, but UV is an aggravating factor and so is Vitamin D deficiency. Some sun exposure is essential to health and the health of skin, but indoor lifestyles mean that Vitamin D levels are dangerously low in a large proportion of the population. This may seem contradictory but 15 minutes of direct sun exposure on a large part of your body a few times a week is healthy.