One of the questions we get frequently at the NoR, and that I hear in gun shops all the time, is "What should I get as my first handgun?"; this is usually followed by "I've only got about $300-$400 to spend".
Well, my answer to this is always "Are you looking just to shoot at the range, or are you looking for a gun to defend yourself with?"
If you’re looking to establish basic pistol shooting skills, I’d recommend purchasing a double action .22 revolver, like the Smith and Wesson model 17, 18, or 617; or .22 automatic like the Browning Buckmark, or Ruger Mark X series pistol (currently at Mark III). There are better shooting .22s out there, but the Ruger and Buckmark are both reliable, and great for practice and fun plinking.
On the other hand, if you’re looking for a self defense weapon, and have no experience with handguns; I can’t recommend strongly enough that you choose a mid size revolver in .357 magnum.
You should be able to find a decent used Ruger SP101 or GP100, the older Ruger Security Six (and it's variants), or an older Smith and Wesson model 19/619 or maybe model 65/620 for $350 or so.
Also, if you hunt around you can find some really GREAT deals on Taurus revolvers, which are just as good as the Rugers, and nearly as good as the S&W's (some of them were originally licensed S&W designs in fact) for a lot less money. Their medium frame 7-shot model 66 can be had for less than $400 brand new from the right dealer, and their slightly more basic model 65 (a 6 shot) for less than $350. Oh and Tauruses have an unlimited lifetime warranty - a BIG plus for anyone but especially a new shooter.
No mater what you get, if you can get one for a good price, I recommend going with a stainless gun. They are just easier to maintain.
Now, the reason I say a .357 revolver, is because they are dead simple, dead reliable, and you have the option of a full power magnum, or a .38spl for practice. The reason I say go for a mid sized (S&W K or L frame for example), is that the large frame pistols are bulkier and heavier than they need to be for .357(and really the GP100 as well which is more of an extra-medium); and the compact .357's are very difficult to properly control. Really they should be considered experts weapons. The mid sized frames are large enough to help tame recoil, and establish a full and solid grip; but not so large that they are difficult to point, or unwieldy. This balance will help you to develop basic handgun shooting skills.
You’re going to have a hard time finding a decent automatic in that same price range without going to a Milsurp or foreign import discount pistol; or by going to CDNN and picking up a reissue. Now, all of these can be a great deal, but again, these are not really weapons for the novice.
The reason I recommend against these bargain autos and re-issues, is because as a beginner, you don't have the experience with pistols yet to deal with malfunctions, and speed reload drills; which are essential for a defensive pistol. If you can’t perform malfunction drills and speed reloads, you are taking a serious risk with your self defense weapon.
I shoot hundreds, and sometimes thousands of rounds a month, and my bedside gun is still a revolver, because I don’t want to think about malfunctions when I’m sleepy and startled. Also as I recently found out, I don’t practice my speed reload and malfunction drills nearly enough; and again, I’m an experienced pistol shooter.
Once you develop good basic handgun habits with a revolver, then you should buy that aforementioned .22 automatic. Then once you’ve developed the basic knowledge of automatic operations, and practice malfunction clearance and reloads, you can venture into full sized automatics; when, hopefully, you have the money to buy a decent one.