Solar greenhouses provide a favorable climate environment for the production of counter-seasonal crops in northern China. The greenhouse environment is a key factor affecting crop growth, so accurate prediction of greenhouse environment changes helps to precisely regulate the crop growth environment and helps to promote the growth of fruits and vegetables. In this study, an environmental prediction model based on the combination of a gradient boosting tree and the Harris hawk optimization algorithm (IHHO-Catboost) is constructed, and in response to the problems of the HHO algorithm, such as the fact that the adjustment of the search process is not flexible enough, it cannot be targeted to carry out a stage search, and sometimes it will fall into the local optimum to make the algorithm’s search accuracy relatively poor, an algorithm based on the improved Harris hawk optimization (IHHO) algorithm-based parameter identification method is constructed. The model considers the internal and external environmental and regulatory factors affecting crop growth, which include indoor temperature and humidity, light intensity, carbon dioxide concentration, soil temperature and humidity, outdoor temperature and humidity, light intensity, carbon dioxide concentration, wind direction, wind speed, and opening and closing of upper and lower air openings of the cotton quilt, and is input into a prediction model with a time series for training and testing. The experimental results show that the MAE (mean absolute error) values of temperature, relative humidity, carbon dioxide concentration, and light intensity of the model are reduced to 49.8%, 35.3%, 72.7%, and 32.1%, respectively, compared with LSTM (Long Short-Term Memory), which is a significant decrease in error. It shows that the proposed multi-parameter prediction model for solar greenhouse environments presents an effective method for accurate prediction of environmental data in solar greenhouses. The model not only improves prediction accuracy but also reduces dependence on large data volumes, reduces computational costs, and improves the transparency and interpretability of the model. Through this approach, an effective tool for greenhouse agriculture is provided to help farmers optimize the use of resources, reduce waste, and improve crop yield and quality, ultimately leading to a more efficient and environmentally friendly agricultural production system.