A few years ago I would have scoffed at the idea of an AR15 making a good HD weapon. Then I drank the Kool-aid and bought one. A good quality AR is an awesome HD weapon, there are plenty to choose from and getting easier to find every day. Put a good optic if you wish such as a ACOG or Eotech, or my preference is a 1-4.5 scope and feed it good ammo. Practice and be comfortable in both its and your capabilities. There are a lot of factory ammo choices from the funky labeled Zombie Max to varmit to deer hunting loads for the .223 Rem. Pick one it likes and keep some mags loaded and ready. I personally don't like the looks and feel of the 30 rounders but they are nice to have loaded and ready should you need it. Shoot it regularly and keep it clean. I chose a Remington R15 and love it, but there are a lot of perfectly good ones out there to be hand.
Should you prefer something more mundane anything from a lever action rifle, to a good shotgun will work wonders on a bad guy. The weapon is good but the operator of said weapon is the key. Put a ruger 10/22 in a good shooters hands and it will do a lot of damage in a hurry. I chose the AR platform partly because my wife is a Army vet and has zero problems with handling and functioning of the weapon should I not be around. Combine that with low recoil, good terminal performance and cheap enough to shoot that practice won't bankrupt you and I couldn't ask for anything more.