Vampire bats are in a diverse family of bats with many food sources, including nectar, pollen, insects, fruit, fish, and meat.
The three species of vampire bats are the only mammals that have evolved to feed exclusively on blood (hematophagy) as micropredators, a strategy within parasitism.
Hematophagy is uncommon due to the number of challenges to overcome for success: a large volume of liquid potentially overwhelming the kidneys and bladder, the risk of iron poisoning, and coping with excess protein.
There are multiple hypotheses for how vampire bats evolved.
This site contains all about Vampire Bats Feeding On Humans.