Workload prediction is the necessary factor in the cloud data center for maintaining the elasticity and scalability of resources. However, the accuracy of workload prediction is very low, because of redundancy, noise, and low accuracy for workload prediction in cloud data center. Therefore, in this article, a tree hierarchical deep convolutional neural network (T-CNN) optimized with sheep flock optimization algorithm based work load prediction is proposed for sustainable cloud data centers. Initially, the historical data from the cloud data center is preprocessed using kernel correlation method. The proposed T-CNN approach is used for workload prediction in dynamic cloud environment. The weight parameters of the T-CNN model are optimized by sheep flock optimization algorithm. The proposed COSCO2 method has accurately predicts the upcoming workload and reduces extravagant power consumption at cloud data centers. The proposed approach is evaluated utilizing two benchmark datasets: (i) NASA, (ii) Saskatchewan HTTP traces. The simulation of this model is implemented in java tool and the parameters are calculated. From the simulation, the proposed method attains 20.64%, 32.95%, 12.05%, 32.65%, 26.54% high accuracy, and 27.4%, 26%, 23.7%, 34.7%, 36.5% lower energy consumption for validating NASA dataset, similarly 20.75%, 19.06%, 29.09%, 23.8%, 20.5% high accuracy, 20.84%, 18.03%, 28.64%, 30.72%, 33.74% lower energy consumption for validating Saskatchewan HTTP traces dataset than the existing approaches, like auto adaptive differential evolution algorithm BiPhase adaptive learning-based neural network, error preventive score in time series forecasting models, time series forecasting methods for cloud data workload prediction, and self-directed workload forecasting method.