As the solar energy develops sharply in recent years, accurate solar output forecasting is becoming one of the most important and challenging problems in modern power system. For enhancing the prediction accuracy of solar output, this research proposes an effective forecasting method using the famous compete ensemble empirical mode decomposition with adaptive noise (CEEMDAN), gated recurrent unit (GRU) and cooperation search algorithm (CSA). The proposed methodology is composed of three important stages: firstly, the solar output signal is divided into a set of relatively simple subcomponents with obvious frequency differences via the CEEMDAN method; secondary, the GRU model is used to individually forecast each subcomponent while the CSA method is used to optimize the GRU parameters and enhance the forecasting ability; finally, the simulation values of all constructed models are added to obtain the corresponding forecasting results. The developed model takes advantages of the data decomposition technique and advanced machine learning to identify the suitable dependence relationship and network topology structures. Extensive experiments indicate that the developed model can yield accurate forecasting results for solar outputs in comparison with several traditional forecasting methods with respect to different evaluation criteria. Thus, an effective framework combining the signal decomposition technique and evolutionary method into machine learning model is presented for solar output forecasting.