The rapid development of Internet and cloud computing technologies has led to the expansion of the scale of data centers, resulting in a continuous increase in the demand for data processing and storage. This not only results in higher energy consumption but also makes thermal management a key factor of energy management in data centers. A capacity configuration method is proposed for the core thermal management equipment of data center microgrids, electric boilers, cooling systems, and heat pumps. This method not only considers the uncertainty factors of the source and load but also effectively utilizes the characteristics of various flexible resources in data centers, such as the adjustable ability of different types of batch processing loads, air thermal inertia, and waste heat recovery, significantly improving the energy utilization efficiency and enhancing the system’s economy and flexibility. In addition, a wind power scenario generation method based on conditional least squares generative adversarial networks was proposed to improve the generation quality of wind power scenarios, and a random optimization model was constructed. Considering a certain province’s data center microgrid as a case study, the effectiveness of the model was verified, and a sensitivity analysis of the relevant parameters provided important references for microgrid planning. This study provides a new perspective and tool for the thermal management of data center microgrids and comprehensive utilization of renewable energy, which is of great significance for promoting the improvement of data center energy efficiency and sustainable development.