To reach the target yield of crops, nutrient management is essential. Selecting the appropriate prediction model and adjusting the nutrient supply based on the actual situation can effectively improve the nutrient utilization efficiency, crop yield, and product quality. Therefore, a prediction model of the NPK fertilizer application rate for greenhouse tomatoes under the target yield was studied in this study. Under low, medium, and high soil fertility conditions, a neural network prediction model based on the sparrow search algorithm (SSA-NN), a neural network prediction model based on the improved sparrow search algorithm (ISSA-NN), and a neural network prediction model based on the hybrid algorithm (HA-NN) were used to predict the NPK fertilizer application rate for greenhouse tomatoes. The experimental results indicated that the evaluation indexes (i.e., the mean square error (MSE), explained variance score (EVS), and coefficient of determination (R2)) of the HA-NN prediction model proposed in this study were superior than the SSA-NN and ISSA-NN prediction models under three different soil fertility conditions. Under high soil fertility, compared with the SSA-NN prediction model, the MSE of the ISSA-NN and HA-NN prediction models decreased to 0.007 and 0.005, respectively; the EVS increased to 0.871 and 0.908, respectively; and the R2 increased to 0.862 and 0.899, respectively. This study showed that the HA–NN prediction model was superior in predicting the NPK fertilizer application rate for greenhouse tomatoes under three different soil fertility conditions. Due to the significance of NPK fertilizer application rate prediction for greenhouse tomatoes, this technique is expected to bring benefits to agricultural production management and decision support.