This study presents a fundamental investigation of the convection heat transfer phenomenon driven by airflows in underground tunnels, with reference to the development of the so-called thermal and velocity boundary layers. The purpose of the work is to expand on the knowledge of non-isothermal problems of internal flow common to applications involving pipes, pipelines and conventional tunnels, as well as to innovative applications involving so-called energy tunnels that can provide structural support and energy supply to built environments. The study is based on three-dimensional thermo-hydraulic Computational Fluid Dynamics simulations accounting for the actual fluid flow that occurs in the aforementioned environments, and addresses the investigated phenomena by considering tunnels with different (i) shapes of the cross-section, (ii) inlet airflow velocities and (iii) surface wall(s) roughness. The results of this investigation highlight a crucial influence of the previous variables on the convection heat transfer phenomenon, which is inherently related to the development of the thermal and velocity boundary layers. The work also presents novel relationships between the convection heat transfer coefficient and the average airflow velocity that may be used in the analysis and design of the addressed non-isothermal problems of internal flow.