The Vaults are residence run bunkers which are located underground and were specially created to be used as a safe place to go in the event of a possibly future invasion. During the Clandestine Company's domination of City 17 and unleashing monsters upon the world, the Bunker was used to keep safe anyone who was unable to help fight during the Battle of Clandestine in 2016. This mostly included older people, those with health problems and children (and a parent or guardian to take care of them).
After the defeat of the Combine Empire on earth, the newly established Resistance Government built underground vaults in the event of a future threat ever coming to earth. The facilities were located across many parts of the world, and preferred residents were either children (with a designated parent or guardian) and the elderly, as they weren't strong enough to combat any sort of major threat which would prohibit usage of the Vaults.
In 2016 - approximately nine years since the downfall of the Combine on Earth, the Vaults across earth came into use when the Clandestine Company launched a mass invasion across the planet by opening gateways to other dimensions and letting through monsters, demons and rogue aliens as part of their plot of world domination. Many people were sent into the Vaults for their safety, whilst more stronger or willing inhabitants of earth and those that opposed the Clandestine Company joined the Resistance in their fight.
Despite being built for safety, some Vaults were infiltrated, which inhabitants either killed or captured for experimentation by Clandestine forces, and the Vaults destroyed. In the aftermath of the Fall of the Clandestine Company, survivors left the Vaults to a post-apocalyptic world in order to start over and reunite with those who survived in the Resistance.