This paper develops an optimal bidding strategy for a data center operator (DCO) participating in the day-ahead electricity market. The DCO is regarded as a price maker managing several data centers (DCs) located in different buses of the transmission network (TN) with local renewable power generators. Based on the Stackelberg game theory, a bi-level optimization model is established to minimize operating costs and carbon emissions while spatial and temporal dispatches of workload are performed. The bi-level optimization model is transformed into a single-level using the Karush–Kuhn–Tucker technology and linearized equivalently. The Pareto set is obtained using the epsilon constraint method. Then TOPSIS combined with Shannon entropy is used to select the optimal solution. In addition, data-driven robust optimization is employed to tackle uncertainties of renewable power generations. A DCO containing four DCs and an adapted IEEE 14-bus TN are used for the case study. The results show that dispatches of workload reduce operating costs and carbon emissions significantly. Moreover, it is better to regard the DCO as a price maker than a price taker. Finally, the results with different uncertainty budgets are analyzed. All the results and analysis demonstrate the superiority of the optimal bidding strategy proposed in this paper.