Heat Is Bad!
While all glasses are susceptible to heat damage, plastic frames are more vulnerable than metal frames. Moderate heat is used to soften frames to be fitted properly. When left in a hot car, the intense heat can warp the temples and the frame front, loosen the embedded hinges and/or expand the frame making the lenses loose.
Lenses are damaged by the heat too. The polarized film used in sunglasses can be damaged by excessive heat. Expansion and contraction of the lenses with temperature extremes can cause warping of the lenses resulting in poor optical quality. Anti-reflective and scratch resistant lens coatings can also expand at a different rate than the base lens material causing the coatings to crack or craze. While newer premium coatings are more tolerant of heat, even those can fail when exposed to extreme heat.