Firearms - even when properly cleaned, oiled, and maintained – can be vulnerable to damaging corrosion if exposed to prolonged periods of high humidity and possibly extreme temperatures. Wooden stocks, meanwhile, can dry out and crack if exposed to non-optimal conditions for prolonged periods.
For storage of guns and ammo in a gun safe, gun vault or gun cabinet, many recommend using desiccates and/or gun safe dehumidifier (such as a dehumidifier rod). It's also recommended to monitor humidity and temperature. Many say that a 50% relative humidity and temperature of 70°F is generally safe for storage of guns and bullets, but always check with the manufacturer of your handgun or rifle for specific conditions.