There are 25 weapon upgrades in the game. Weapons such as the Bow, Terror 4000 and Flamer do not have upgrades and do not count towards this achievement.
To see how to unlock a weapon upgrade, go to the store and choose "Weapons" and then choose the gun you want. Each attachment can be unlocked either by beating a side mission or achieving a benchmark number of collectibles, such as finding half of the TV sets or killing one of each animal on the island. None are related to story progression, and I unlocked this achievement after the third story mission of the game, as that's when I attacked all the garrisons, which in turn unlocked all the side missions.
The total credits you need to unlock all the weapons is $43,150. Below is a list by weapon, starting with the total costs for all attachments for the weapon, and then a breakdown of what each attachment costs.
A.J.M: $5,100
Suppressor: $400
Laser Sight: $1,200
Larger Mag: $1,500
Max Mags : $2,000
Fazertron: $11,850
Light Barrel: $750
Grip: $1,000
Extended Mag: $1,100
Full Auto: $2,000
Even Larger Mag: $1,500
Mag Pouch: $2,000
Laser Rounds: $3,500
Galleria 1991: $13,250
Extended Mag: $750
Double Barrel: $1,000
Semi-auto Upgrade: $1,500
Really Huge Mag: $1,750
Bandolier: $2,000
Quadruple Barrel: $2,500
Fire Rounds: $3,750
Kobracon: $12,950
Extended Mag: $1,000
High Powered Scope: $1,000
Fog Scope: $1,250
Aim Stabilizer: $1,500
Big Ol' Box Of Ammo: $2,200
Semi-auto Upgrade: $2,750
Explosive Rounds: $3,250
litepink noted there was a glitch to refill ammo for free and conserve cash, but this may have been patched:
"If you have a weapon with little to no inventory, swap it out of the weapon wheel with a different weapon from your inventory. Then, swap your weapon back into the wheel. Just like that, you have full ammo. For a gun like the Terror 4000 that saves you $700 each time."