Crop yield prediction has gained major potential for global food production. Predicting crop yields based on specific parameters like soil, environment, crop, and water has been an interesting research topic in recent decades. To accurately predict crop yields, measuring the severities of natural calamities including water level is mainly required. However, the existing studies failed to predict crop yields accurately because of various issues like overfitting problems, difficulty in training, inability to handle large data, and reduced learning capability. Thus, the proposed study develops an efficient mechanism for accurately predicting crop yields by analyzing several natural calamities. Here, the input samples are initially pre‐processed to remove unwanted noises using data normalization and standardization. To enhance the performance of crop yield prediction, natural calamities are computed by using an Extreme Gradient Boosting (XGBoost) model based on parameters like the Palmer Drought Severity Index (PDSI), Severe Hail Index (SHI), and Storm Severity Index (SSI). Also, the hyperparameters of XGBoost model are tuned by utilizing Sheep Flock Optimization Algorithm (SFOA). Finally, the crop yield is predicted by proposing a new one‐dimensional convolutional gated recurrent unit neural network (1D‐CGRU). The proposed classifier predicts the crop yields with reduced error rates like mean square error (MSE) of 0.4363, root mean square error (RMSE) of 0.1904, normalized root mean squared error (NRMSE) of 0.00101, mean absolute error (MAE) of 0.2437, and R‐squared (R2) of .2756. Also, the significant findings of the proposed study positively indicate that this study can be applicable to real‐time agricultural practices and is highly suitable for water quality predictions. Also, it can assist farmers and farming businesses in predicting the yield of crops in a specific season when to harvest and crop a plant for attaining improved crop yields.