This paper focuses on how insolation affects the nucleus of comet 67P/Churyumov-Gerasimenko over its current orbit. We aim to better understand the thermal environment of the nucleus, in particular its surface temperature variations, erosion, relationship with topography, and how insolation affects the interior temperature for the location of volatile species (H_2O and CO_2). We have developed two thermal models to calculate the surface and subsurface temperatures of 67P over its 6.45-year orbit. The first model, with high resolution (300 000 facets), calculates surface temperatures, taking shadows and self-heating into account but ignoring thermal conductivity. The second model, with lower resolution (10 000 facets), includes thermal conductivity to estimate temperatures down to ∼3 m below the surface. The thermal environment of 67P is strongly influenced by its large obliquity (52^∘), which causes significant seasonal effects and polar nights. The northern hemisphere is the coldest region, with temperatures of 210--300 K. H_2O is found in the first few centimetres, while CO_2 is found deeper (∼2 m) except during polar night around perihelion, when CO_2 accumulates near the surface. Cliffs erode 3--5 times faster than plains, forming terraces. The equatorial region receives maximum solar energy (8.5times10^9 J m^-2 per orbit), with maximum surface temperatures of 300--350 K. On the plains, H_2O is found in the first few centimetres, while CO_2 is found deeper (∼2 m) and never accumulates near the surface. In the southern hemisphere, a brief intense perihelion heating raises temperatures to 350--400 K, which is followed by a 5-year polar night when surface temperatures drop to 55 K. Here H_2O remains in the first few centimetres, while CO_2 accumulates shallowly during polar night, enriching the region. Erosion is maximal in the southern hemisphere and concentrated on the plains, which explains the observed overall flatness of this hemisphere compared to the northern one. Over one orbit, the total energy from self-heating is 17% of the total energy budget, and 34% for thermal conduction. Our study contributes to a better understanding of the surface changes observed on 67P.