This idea has popped up a couple times recently. I think everyone should own a .22lr rifle as part of their basic 4. I am a huge fan of the Ruger 10/22 for this nitche. If you are going to own more then those 4 basic guns a .22 pistol is a must.
Someone is going to inevitably mention that the .22lr kills a large amount of the people who die firearms related deaths in a given year. I tried to look this up and failed but it has been thrown out enough times that there is probably some truth to it.
The reason for this is that it is what people tend to have at hand most often. Almost every home that owns a gun has some sort of a .22 and many of the cheap Saturday night special kind of guns are chambered in this caliber because low pressure guns are easier and cheaper to make. That it kills oodles of people doesn't mean it is the BEST at killing people.
More people throughout history have probably been killed by sticks and stones (or simple variants thereon) than anything else. From the beginning of time to the 17th century these accounted for almost all deaths and though the spread of firearms has changed what people kill each other with in any big city during a given month someone almost surely gets hit in the head with a stick (bat, pool cue, etc) and dies.
The Chechens did use use silenced .22 rifles for urban sniping with some success. For this nitche role (shooting someone in the head/ neck at close distance) they worked admirably.
They are not however a defensive weapon and have a bad tendency not to STOP violent aggressors. From a strictly tactical perspective taking someone out of the fight is more important then the harm that is done to them. Some Goblin getting knocked unconscious while chasing you with a knife because his saggy assed pants slip off his ass and he falls strait on his head is more of a win then putting a few rounds of .22 into him which leads to death several hours later AFTER the conflict is otherwise resolved.
If you have a .22 handy that is fine and well but if you are CHOOSING a gun for defense make it a shotgun or centerfire pistol.