Assuming you are playing in singleplayer mode and nobody "stole" your villagers, it sounds like they either wandered off or were killed by mobs. If you AFK'd while in the village, you might not have noticed mobs spawning in dark corners of the village or even on unlit roofs. If you didn't have a fence around the village, villagers can wander off and mobs can spawn in the dark surroundings and enter the village to slaughter the villagers.
If all the villagers are really gone you have several options.
1. You can give up the village as a lost cause and go look for a new one.
2. You can transport 2 unemployed villagers from another village to this one, give them workstations, beds and food until they breed and replenish the village population. Depending on where the villages are located, this may be an option.
3. You can capture a zombie villager and name tag him so he won't despawn until you gather the resources to cure him. (Don't forget to protect him from the sun.) You will need to do this twice, of course in order to have 2 cured villagers to breed.
4. You can temporarily switch to Creative mode if you have cheats enabled and spawn in new villagers.
There may be other solutions, but these are the ones I am familiar with.