A coupled chemistry-climate model of both lower and middle atmospheres is used to study variations in the temperature of the atmosphere when its chemical composition is disturbed due to thunderstorm activity, which results in variations in its local heating and cooling and in atmospheric heat and mass transfer. The results of model calculations showed that, due to variations in the lightning production of nitrogen oxides and resulting variations in the concentrations of atmospheric gases, the temperature varies mostly in the lower and middle stratospheres over both tropical and polar regions. On average, over a period of several decades, this effect quantitatively amounts to a few tenths of a degree; however, it can reach a few degrees at heights of the lower stratosphere over Polar regions. The level of the statistical significance of estimates exceeds 0.95 almost within all height ranges for the global lightning production (exceeding 6 TgN/year).