(Actually, this novel by Richard Matheson has not one, not two, but four film adaptations...)
Here is the book description from Goodreads:
Robert Neville is the last living man on Earth... but he is not alone. Every other man, woman and child on the planet has become a vampire, and they are hungry for Neville's blood.
By day he is the hunter, stalking the undead through the ruins of civilisation. By night, he barricades himself in his home and prays for the dawn.
How long can one man survive like this?
I Am Legend is the best vampire novel I have ever read (step aside Mr. Stoker!), and it's all due to the atmosphere. The author creates a suffocating environment charged with loss, guilt and helplessness, in which we follow Neville through his day-to-day repairing his home, scavenging for food, and hunting down and killing as many vampires as possible before the sun sets.
Once the final rays of light vanish from the sky, Neville's nightmare deepens. The vampires thirsty for his blood are neighbors--neighbors who know his name and pound on his door and beckon him to come out. It's enough to drive you insane. And that's just what happens to Neville.
Grasping for his sanity, he turns to science. Here came the best part of the novel: Neville attempts to find a medical explanation for vampires. From the loathing of garlic to the fear of religious symbols, Neville researches and teaches himself about biology and technical equipment in an attempt to uncover reasons--or a cure--for this worldwide outbreak. He snags vampires and takes samples from them, analyzes their blood, and finds something very peculiar...
I Am Legend is a compelling view into the psyche of the last man on Earth. The fact that you, the reader, are all alone with Neville for the vast majority of the novel sucks you that much deeper into his world of despair. Is fighting worth it? What's there left to fight for? What's life worth, if it's surrounded by death? If the future only holds death?