People associate dark circles with stress and fatigue. "You look terrible, did you stay working late last night?" Sometimes they are right, but the reality is that there is a range of things that can cause those dark circles under the eyes, starting with our own genetics.
The area around the eyelids is thinner and contains less oil than any other part of the skin. It is known as the periorbital skin and has an average thickness of 0.5 mm - when the average thickness of the rest of the body is 2 mm. As a result, the blood capillaries and the blood flowing through them can be clearly seen from the outside.
Blood is red, as we imagine you know; but if you look at your wrists, you will see that the veins are perceived as blue. This occurs because our subcutaneous tissue allows only the blue and purple wavelengths to pass through the skin, so that the light reflected by the veins is perceived in our eyes as a bluish color (unless you have darker skin, in in which case you will see greenish or brown veins; or you are albino, and have veins of a color more similar to the dark red of blood).
As SciShow explains on his YouTube channel, the same concept applies to the dark color around the eyes. Dark circles are, in general, light that our blood vessels reflect through the fine bags of skin that we have on our face. That's why when someone fights in a bar they end up with a black eye: that area shows broken glasses more easily.
Genetics play a fundamental role in dark circles. The natural pigmentation of the skin (or the amount of melanin that is produced under the eyes) can cause darker and more obvious dark circles, which is known as “idiopathic periorbital hyperchromia”. This condition is most noticeable in people with darker skin tones, such as Turks and Hindus. Allergies can also be another important one: Allergic reactions cause the body to release histamines, which dilate the blood vessels in that area. Also, sunlight can damage skin cells around the eyes if you don't protect yourself with sunscreen.
Dark circles can get worse with age and, yes, with insomnia or fatigue. People lose the elasticity and regeneration capacity of the skin as we age, which makes the periorbital area even thinner (that is why grandparents have more dark circles, regardless of the hours they sleep). On the other hand, if we are stressed our body will produce cortisol to keep us alert. Over time, cortisol can constrict the blood vessels or, in this case, dilate them and make the dark bags under the eyes even more noticeable.