In order to further improve the accuracy of photovoltaic (PV) power prediction and the stability of power system, a short-term PV power prediction model based on hierarchical clustering of K-means++ algorithm and deep learning hybrid model is proposed in this paper. First, hierarchical clustering of the K-means++ algorithm is used to cluster historical data into different weather scenes according to different seasons. Second, a hybrid model combining convolutional neural network (CNN), squeeze-and-excitation attention mechanism (SEAM), and bidirectional long short-term memory (BILSTM) neural network is constructed to capture long-term dependencies in time series, and the improved pelican optimization algorithm (IPOA) is used to optimize the hyperparameters in the prediction model. Finally, an example for modeling analysis is conducted by using the actual output and meteorological data of a PV power station in the Ili region of Xinjiang, China. The effectiveness and accuracy of the proposed model are verified by comparing with LSTM, BILSTM, CNN-BILSTM, and POA-CNN-SEAM-BILSTM models, and the superiority of IPOA is verified by comparing with particle swarm optimization and whale optimization algorithm. The results show that the proposed model can obtain better results under different weather scenes in different seasons, and the prediction accuracy of the model optimized by IPOA is further improved.