There is no question that this is somewhat of a subjective issue, but I believe that there is a good answer that fits the majority of people out there. Ideally, you should have one of each firearm type (a handgun, a rifle, and a shotgun) and hopefully even multiples of each type.
However, if I were to be limited to one firearm and one firearm only, I would choose a common self defense caliber concealable pistol (9mm, .40S&W, .45ACP). For me, It's a Glock 26 or 27 (I own both), but once again, this is a personal/subjective thing. I would probably opt for the Glock 26 ultimately though.
I don't think that handguns are very effective weapons (relatively speaking) and wouldn't want to count on one over other choices (rifle, shotgun) if I had no choice. They are a last ditch defensive weapon. A backup weapon.
However, the reasons I would choose a pistol are simple. It is my belief that the most likely life threatening scenario (mugging, kidnapping, bank/store robbery, etc...) any normal citizen would likely encounter that would require a gun outside of the home would likely be handled with the use of a concealed weapon. Not because they are the most effective, but because they are much more handy and convenient to take with us.
If one suspected trouble or believed he/she was headed into a gunfight, they would be a fool not to take a rifle/shotgun. However, you don't usually go out of your home suspecting that you will be mugged. I've personally been held at gunpoint. It was random, sudden, and unexpected. I was defenseless at that time and not even old enough to legally carry a concealed weapon.
It'd be difficult to describe the feeling of helplessness when you are held at gunpoint, but I can assure you that it is not a good feeling. You don't really know what drugs he may be one, what his past is, or even what his true motives are. However, having a weapon can equal the playing field and give you a chance to survive a lethal encounter. Luckily for me, no harm was done after the robber relieved us of all of our valuables.
Some people have not been as lucky...
On top of using a pistol for concealed carry, it can also be used for home defense (although it is not as effective as a rifle or a shotgun) as well. I recommend something else if you are wanting a strict home defense weapon, but for an all-purpose defensive firearm, if I could only have one, I would go with a concealable handgun.
The pistol is better in one regard than the other options, because it allows a homeowner to check his property or investigate strange noises (etc...) without drawing unnecessary attention to himself. It may be strange to walk outside with a long gun to check on something only to find your neighbor harmlessly going about his business when you could have thrown a pistol in your pocket to investigate...
Above all, make sure you train with your firearms. Practice shooting quickly and accurately, drawing the weapon (from your preferred concealed carry methods), reloading the weapon, etc... When the adrenaline flows, you will not rise to the occasion, you will likely perform at the level of your training, whatever that may be.
Also, get a concealed carry permit.
Want to know what I would pick as the second If I could only own 2?