When vampire mythology began to emerge, they were far less sparkly than their contemporary counterparts. Precursurs to these bloodsuckers appear in Ancient Greek and Mesopotamian folklore and since then they've appeared in many different cultures. Jiang Shi, for instance, are the Chinese analog to the western vampire. The vampires we now know and love only really begin to take shape in the early 18th century. Contemporary bloodsuckers are more varied in their characteristics; some are weak to fire and die from sunlight, some don't. Some need to be staked in the heart with a piece of wood, some with iron.
The general image though of the western vampire—a pale faced, bloodsucker who is active at night—may have its origins in biology.
As explained in a video by Untamed Science, in the 1500s, corn was a staple crop of peasants. If you only ate corn every single day, you could actually develop niacin deficiency, a condition also known as pellagra.
Common symptoms of pellagra include extreme sensitivity to sunlight, agression, and dementia. If exposed to the sun, a pellagra sufferer's skin turns scaly and it almost looks like they're burnt, as you can see in the picture below. Other pellagra symptoms, such as insomnia, would explain why the "vampire" appears to be active at night. The sufferer's stomach also bleeds, so they can't eat normal food.
This is not the only supposed biological origin of these creatures of the night.
Porphyria, a rare disease that causes irregular production of heme in the blood, is another condition that has vampire-like symptoms. People afflicted with a serious case of porphyria are highly sensitive to sunlight and suffer from delirium. In the past, one of the cures was possibly to drink blood, though there is no clear evidence that this was actually prescribed.
Furthermore, catalepsy, similar to epiplepsy, is a nervous system disorder and in the Middle Ages, it was poorly understood. People who undergo cataleptic episodes experience muscle rigidity, possibly for days, regardless of what's going on around them.
Back in the days before modern medicine, a cataleptic episode—especially if it lasted a long time—was often mistaken for death. Unfortunately, some of these individuals were buried alive. Obviously, if the grave was dug up later for whatever reason, villagers would be shocked to see scratch marks on the coffin and a much more fresh-looking body than what they would expect to see.
As people began to realize what was going on, safety coffins were eventually built to signal to the surface that the buried individual was still alive. There is no data to suggest that they actually worked to prevent any premature burials though.
General misunderstanding of human decomposition may have also contributed to the belief in vampires. Nowadays we understand that when a body decomposes, bloating occurs as bacteria start to break down cells, producing gas, and possibly forcing blood up into the mouth. This whole process was delayed though if the body was buried when it was colder, making the corpse look more fresh than one might expect weeks later. We also now know that fingernails and hair continue to grow after death.
You can start to imagine how all this looks to someone in the Middle Ages: The recently deceased must be a vampire because their body looks like it just fed and the individual didn't decompose at all.
In addition to biological conditions, historical figures also possibly contributed to vampire folklore. The lives of individuals like Vlad the Impaler and Elizabeth Bathory are often cited as inspiring vampire lore and works of vampire fiction, like Bram Stoker's Dracula.
With so many sources of inspiration, it's no wonder vampire lore is so rich and diverse.
[Images above: Pellagra patient by Herbert L. Fred, MD, Hendrik A. van Dijk via Wikimedia Commons. Licensed by CC.]