The problem with firing a gun underwater is overpressure. In a vacuum, you don't really have any problem with that at all— but I would be a little concerned about firing, say, a Glock, or anything else lacking a fully supported chamber. I really don't know enough about cartridges, reloading, and ballistic pressures to say whether this is could really be a problem or not.
Not all guns will even have problems firing underwater, and any modern catridge fed weapon will fire at least once. Some will catastrophically fail, some will end up with warped or cracked barrels (M16s are famous for this, especially in Vietnam), some will simply fail to cycle, and some will function just fune without modification. But cartridges are sealed, so unless those fail, they will go off in any environment. DEFkon raises some interesting points about temperature, though, as that could certainly affect the life of exposed equipment and ammunition.