You can buy a good handgun anywhere from $400 - $1000. Ruger handguns are usually the cheapest guns that have acceptable quality. Any cheaper than that for a handgun and you're getting into unreliable and uncomfortable performance. Cheap guns built by AMT, Jennings/Bryco, Hi-Point, etc. are some examples of cheap and unreliable / uncomfortable weapons.

Although, if I were a poor man, I wouldn't hesitate to buy one of the cheap guns. A cheap uncomfortable gun in the hand is better than none, because you'll at least have some sort of defense. But if you have enough money, you should definitely get a more reputable model, such as a Kimber, Springfield, Sig, Glock, HK etc.

If you're looking for home defense, you can't beat a 20"-barrelled 12 gauge pump or semi auto. They'll run about the same amount as the handgun, but with far more devastating firepower. It's much harder to miss your target when using shotshells.

Look in Shotgun News, Gunbroker.com, Gunsamerica.com, etc., and go to gun shows for good deals on used guns. Guns last a long time so a used gun is usually just as good as a new one but are much cheaper.