This paper presents a data-driven predictive control method for optimizing the energy consumption of air-cooled data centers with unknown system model parameters. First, based on the measurable data of the studied system, the subspace predictive control (SPC) method is adopted to improve the energy use efficiency of the data center by regulating the power allocation of the server racks and the supply temperature of cold air, while ensuring the safe operating environment of the electronic equipment. Furthermore, a reasonable event-triggered law is designed to solve the problem of the low computational efficiency of the conventional SPC method. The simulation results illustrate that the designed event-triggered law can improve the computational efficiency of the algorithm while maintaining the control performance of the algorithm, which verifies its application prospect in practice.