The Glock 19 is the sidearm of the majority of the NYPD detectives in the film including Detective Terry Hoitz (Mark Wahlberg) and Detective Allen Gamble (Will Ferrell). Gamble is also seen being forced by Capt. Mauch (Michael Keaton) to carry a wooden version of a Glock as a "holster stuffer" replacement of his service gun after he is talked into, by Det. Fosse (Damon Wayans Jr.) and Det. Martin (Rob Riggle), doing a "desk pop". Gamble shoots his Glock into the ceiling of the police station as a brave stunt, prompting all the other officers in the room to draw their weapons on him, Gamble proudly saying "Hey, guys! I did my first desk pop!" Glock 19s are also seen in the hands of a couple of criminals. Throughout the film, the actors have fairly good trigger discipline.(IMFDB thanks The Golden Closet for providing the documentation on this gun; also see their sales page for Mark Wahlberg's weapon, here.)
In Detective Hoitz's flashback his Glock has switched into a "Non Gun" Glock. This was probably done for the safety of the actors during the scene.
Wooden Gun
One of the gags in The Other Guys begins when Det. Gamble is tricked into performing a "Desk Pop" with his Glock 19 inside of the police station and has his weapon temporarily confiscated and replaced with a wooden gun shaped like a Glock 19 throughout much of the film. (IMFDB thanks The Golden Closet for providing the documentation on this gun, as well as the image seen below.)
Det. Danson (Dwayne Johnson) is seen with what appears to be a nickel Colt Mk IV with pearl grips as his main sidearm. (IMFDB thanks The Golden Closet for providing the documentation on this gun; also see their sales page for the weapon, here.)
Charter Arms Undercover
Det. Terry Hoitz (Mark Wahlberg) keeps a Charter Arms Undercover with pearl grips as his back-up gun. He is most notably seen wielding it during the boardroom shootout.
SIG-Sauer P226R
Roger Wesley's (Ray Stevenson) sidearm throughout the whole film is a SIG-Sauer P226R. Some of Wesley's thugs also use P226Rs.
Wesley's P226R changes into a "Non Gun" SIG during the climax.
SIG-Sauer P232
Wesley's accomplice, simply billed as the "Brazilian Woman" (Tess Kartel) uses a two-tone Sig-Sauer P232 as her sidearm in the film. She most notably uses it in the boardroom shootout.
Astra 400
One of the Rasta robbers in the beginning, who are fleeing from Detectives Highsmith and Danson, uses an Astra 400.
Browning Hi-Power
One of the thugs that opens fire on Det. Hoitz in the boardroom uses a Browning Hi-Power.
Smith & Wesson Model 36
Carried by Captain Gene Mauch (Michael Keaton) who works both as the head of the Precinct and at Bed Bath and Beyond.
Walther P99
One of the bad guys in the boardroom shootout is seen using a Walther P99 against Det. Hoitz.
Desert Eagle
In some publicity material for the film (such as the poster above), Mark Wahlberg can be seen dual-wielding Desert Eagles with stainless steel finishes, spoofing various John Woo-style movie posters. On the movies web site, Wahlberg is seen firing these, hanging from cables, mocking the poster before crashing into Will Ferrell. Ferrell comments that he dropped his "$1,000 gun". Most Desert Eagles run in range from approximately $1,500-$2,200, making his comment somewhat correct.
SIG-Sauer P220 Sport
In some of the aforementioned publicity material, Will Ferrell can be seen wielding both a Desert Eagle and what appears to be a SIG-Sauer P220 Sport with an accessory rail integrated into the compensator.
FN Minimi/M249
One of the Rasta robbers fleeing from Highsmith and Danson in the beginning uses an FN Minimi/M249 Squad Automatic Weapon to fire at Highsmith's Chevelle SS. He later dumps it as Highsmith comes crashing on the Rasta's Cadillac Escalade with his Chevy Chevelle SS.
SIG SG 556 Classic
Used by the Chechen helicopter gunmen shooting at Gamble and Hoitz during the climax
Heckler & Koch MP5A3
The H&K MP5A3 is used by NYPD ESU officers in the film's climax