Urban vegetation plays a crucial role in regulating temperatures and heat waves in urban areas. However, the influence of vegetation coverage and its configuration on surface temperatures in different climate zones at a national scale is unclear. To address this, we utilized high-resolution data to detect spatial patterns for 31 provincial capital cities in China. We integrated day and night surface temperatures to determine the influence of vegetative coverage and configuration on urban temperatures across different climate zones and city sizes. Our study revealed that a subtropical monsoon climate and medium-sized cities had the highest vegetative coverage and shape complexity. The best connectivity and agglomeration of vegetation were found in a temperate monsoon climate and large cities. In contrast, small cities, especially those under a temperate continental climate, had low vegetation coverage, high fragmentation, and weak agglomeration and connectivity. In addition, vegetative coverage had a negative impact on daytime surface temperatures, especially in large cities in a subtropical monsoon climate. However, an increase in vegetation coverage could result in warming at night in small cities in temperate continental climates. Although urban vegetation configuration also contributed to moderating surface temperatures, especially at night, they did not surpass the influence of vegetation coverage. The effect on nighttime temperatures of the configuration of vegetation increased by 3–6% relative to that of daytime temperatures, especially in large cities in a temperate monsoon climate. The contribution vegetation coverage and configuration interaction to cooling efficiency decreased at night, especially in medium-sized cities in a temperate continental climate by 3–5%. In addition, this study identified several moderating effects of natural and social factors on the relationship between urban vegetation coverage and surface temperatures. High duration of sunshine, low humidity and high wind speed significantly enhanced the negative impact of vegetation coverage on surface temperatures. In addition, the moderating effect of vegetation coverage was more pronounced in low population density cities and high gross domestic product. This study enhances understanding of the ecological functions of urban vegetation and provides a valuable scientific basis and strategic recommendations for optimizing urban vegetation and improving urban environmental quality.