Thermal stress happens when glass is exposed to fluctuating temperatures. Because different parts of the window receive different amounts of sunlight, there can be temperature variations between the center and edges of the window. When the center becomes hotter than the edge of the glass, the center can expand and put stress on the edges of the glass. If the glass isn’t strong enough to withhold the extra stress, the glass can crack (usually at a 90-degree angle from the edge).
Different types of glass have different strengths. Some are stronger and will be able to withstand higher temperature changes better than others. Tempered glass, for instance, is incredibly strong. So much so that it will only break due to thermal stress in the event of a fire. Other types of glass are less resistant to high temperatures.