For guitars, the two most destructive forces are lack of humidity and high heat. If your guitar gets too dry, the wood shrinks, which can cause all kinds of issues. The biggest one on an electric will be a shrinking fingerboard. The frets, being metal, do NOT shrink, so they stick out the sides of the fingerboard, and it can get to feel a bit like you're playing a bread knife. Not pleasant at all. On acoustics, the issues are much worse, because you the wood of the body starts to shrink, which can cause (at the mild end of the spectrum) the action to go down and cause buzzing, to (at the more extreme end) the top back or sides cracking, which frequently ends up knocking the braces loose inside the guitar. All of this can be repaired, but it is expensive, and some of these things never go away cosmetically, so why would you want to risk it. Best to just avoid the problem.
Heat causes other issues. The biggest one is that most of the glues used in building guitars will soften in high heat. This can cause a myriad of problems, from (again, at the mild end) the bridge popping loose (easily repaired most of the time by regluing the bridge, but that STILL cost $125-150 in my shop), to the (set) neck creeping or even causing the fingerboard sliding a bit (both of which are MUCH more difficult to repair). Also, if the headstock on your guitar has ever broken, you are looking at the break coming loose, and once it's been repaired once, the re-repair becomes MUCH more expensive and difficult. (And heat related issues will never be covered under your warranty, even if you don't tell the repair person, because the symptoms of heat related creep are VERY distinctive - the glue goes all stringing).
High humidity isn't really an issue until you get into the extreme end of the spectrum, at which point mold and mildew become very real issues. Up to 70-75% is not a big deal (for short periods of time), however, but still, why not avoid it if you can, right? Also, in high humidity acoustic guitars really start to sound like shit, as they tops get much heavier and they just sound kind of dead.
Cold related damage is usually primarily cosmetic in nature. As the guitar gets cold, the wood (and the lacquer) shrink. If you warm the guitar up to quickly, the lacquer expands at a slower rate than the wood, and you can get a series of very fine cracks in the finish, called weather checking or crazing. It is only a cosmetic issue, but it is difficult and expensive to repair, so if you care at all about how your guitar looks (and most people do), then do your best to avoid it. If your guitar DOES get too cold
As far as a general rule of thumb, if you wouldn't leave your dog or your baby in a place, don't leave your guitar.
Oh, and amps are more robust in many ways, but high humidity can corrode connections, and a lot of cold can cause tubes to crack when the amp is next turned on. The amps cabinet is, of course, glued together, so heat related glue issues exist there as well. the only low humidity issue I can think of is that it may cause the amps coverings to crack, but I'm no expert on amps, so I am probably missing a bunch of issues of concern.
Light
"Cowards can never be moral."
M.K. Gandhi