You unlock Weapon Mods through decoding. You have to level up the gun in co-op &/or multiplayer to unlock and use the various customizable options. Max gun level - 20.