I have recently made this decision for myself in the last few months. I took me quite awhile to decide on what I would carry and the reasons why for my current choice. Before I was alternating between a Glock 22/27. I carried the 22 in a Raven Phantom or a INCOG, and the 27 Usually resided in a Contact Concealment AP Holster or a Galco Quick Slide if I chose to carry on OWB.
I tried many of the handguns that are listed/suggested by others in this post.
The CZ P-07, while a fantastic gun and one that I would definitely love to add to my collection, was not chosen due to I did not want to transition from Da to SA. I wanted a consistent trigger pull from shot to shot. The DA was not bad at all, it just wasn't something that I wanted to transition to. YMMV.
I dismissed the Beretta as well for the same reason. It is a fantastic firearm and very accurate I just didn't want to deal with the weight of the firearm and the DA/SA trigger.
I tried the S&W M&P and this was a one of the firearms that I narrowed to a potential choice. I found the trigger to be consistent from shot to shot, low recoil, comfortable in the hand, and accurate. however, the one thing that precluded it from my decision was the metal magazines and the size. It was essentially the same size as the Glock 22 that I was looking to replace and I unfortunately have very acidic sweat that causes metal magazines as well as metal firearms parts such as magazine releases to corrode. I know that the M&P magazine release is polymer, however when my duty weapon was a Sig 229, I has to wipe down my magazines daily as they would show signs of surface rust. I tend to carry my firearm and magazines IWB. Even carrying them OWB they still make contact with my skin and sweat. I have even tried wearing UA shirts between my skin with no results.
So with all of these issues and considerations I decided on the Glock 19. For me having carried a Glock 22/27 this seemed to me to be the logical choice. I find that I shoot it well, it has great magazine capacity, the ability to mount my X300u, the magazines are not affected by my sweat, it is easily concealed, consistent trigger, plenty of holster choices as well as after market parts.