Neural networks (NNs) have shown outstanding performance in solar photovoltaic (PV) power forecasting due to their ability to effectively learn unstable environmental variables and their complex interactions. However, NNs are limited in their practical industrial application in the energy sector because the optimization of the model structure or hyperparameters is a complex and time-consuming task. This paper proposes a two-stage NN optimization method for robust solar PV power forecasting. First, the solar PV power dataset is divided into training and test sets. In the training set, several NN models with different numbers of hidden layers are constructed, and Optuna is applied to select the optimal hyperparameter values for each model. Next, the optimized NN models for each layer are used to generate estimation and prediction values with fivefold cross-validation on the training and test sets, respectively. Finally, a random forest is used to learn the estimation values, and the prediction values from the test set are used as input to predict the final solar PV power. As a result of experiments in the Incheon area, the proposed method is not only easy to model but also outperforms several forecasting models. As a case in point, with the New-Incheon Sonae dataset—one of three from various Incheon locations—the proposed method achieved an average mean absolute error (MAE) of 149.53 kW and root mean squared error (RMSE) of 202.00 kW. These figures significantly outperform the benchmarks of attention mechanism-based deep learning models, with average scores of 169.87 kW for MAE and 232.55 kW for RMSE, signaling an advance that is expected to make a significant contribution to South Korea's energy industry.