In comparison to long guns (rifles and shotguns), handguns are smaller, lighter, and easier to carry. Since firearms do not rely entirely on the user's strength, they put weaker individuals on an equal defensive footing; when Colt produced the first practical repeating handgun, it gave rise to the saying "God created men, but Colt made them equal".,
Since using a handgun, at a minimum, requires one hand whereas long guns often require both, that leaves a handgun user with a free hand. One example of where this is an advantage is with tactical lights, where the light and handgun can be used independently or in coordination; mounted lights, as used on long guns and submachine guns, don't allow the light to be pointed independently of the firearm. In addition, handguns can be more easily used ambidextrously, and therefore the user can switch firing hands depending on the situation.
Another important tactical consideration in the context of civilian self-defense is maneuverability. An attacker in close quarters with the defender could more easily wrestle a long gun's muzzle to a position where it is not covering him, or could more easily wrestle the gun away from the defender, whereas a handgun offers little to grab, and would be more likely to still be covering some portion of the attacker during the struggle.