Neville's (Will Smith's) sidearm throughout the movie is a Heckler & Koch Mark 23 with a flat earth (tan) frame. He uses the weapon most notably to kill the infected dogs in the middle of the film. There were several identical firing Mark 23s used on-set, as well as rubber versions for stunt work. For most scenes where Will Smith carried the weapon in the holster, a lightweight airsoft Mark 23 (with frame painted tan to match the firing pistols) was used.
Robert Neville (Will Smith) draws a Smith & Wesson 5946 on Anna (Alice Braga) and Ethan (Charlie Tahan). The 5946 in the DAO setting is one of three pistols used by the NYPD (the other two being the Glock 19 and the P226 DAO), so it was likely recovered by Neville from an NYPD precinct.
Heckler & Koch SW SP-10s are used by the two Army Rangers that escort Dr. Neville to the dock. The first seen when Neville says, "Five minutes, we'll make it". The second when Dr. Neville orders the other troops to "get your hands off my wife".
Rifles & Carbines
Colt Law Enforcement Model 6920 Carbine
Robert Neville (Will Smith) uses a semi-automatic Colt AR-15 model that closely resembles an M4A1 carbine; this variant is referred to in the company's catalog as the "Law Enforcement Carbine", or the Model 6920 (see http://www.colt.com/law/lecarbine.asp for more info on this model). The LE Carbine is a semi-automatic-only variant of the M4 with a 16" barrel, but according to the Propstore of London, the weapon was modified to fire automatic for the film. His AR is also equipped with an ACOG (TA31 Series) sight attachment throughout the movie. The tactical light on the gun is a Pentagon MD3R.
M16A2
One of the guards that greets Anna (Alice Braga) and Ethan (Charlie Tahan) is armed with an M16A2. When Neville opens the weapons cabinet there is an M16.
M4A1
Used by US Army Personnel at the harbor during the evacuation scene. One of the M4A1s clearly has a reflex scope on top, with a regular handguard. Others have regular ironsights. (at the part where Dr. Neville says, "Scan her again!")
Unknown Rifle
When Neville (Will Smith) opens up his closet arsenal, an unknown rifle can be seen to next to his M249 SAW.
Machine Gun
M249 SAW
When Dr.Neville (Will Smith) opens the gun cabinet you can see a M249 SAW along with another M4A1 Carbine with the flashlight on the opposite side.