In this study, several machine learning (ML) models consisting of shallow learning (SL) models (e.g., random forest (RF), K-nearest neighbor (KNN), weighted K-nearest neighbor (WKNN), support vector machine (SVM), artificial neural network (ANN), and deep learning (DL) models (e.g., long short-term memory (LSTM), gated recurrent unit (GRU), recurrent neural network (RNN), and convolutional neural network (CNN)) have been employed for predicting air pollution and its classification. The models were selected based on factors such as prediction accuracy, model generalization, model complexity, and training time. Our study focuses on analyzing and predicting the air quality index (AQI) using daily PM10 concentration as natural pollutants and nine meteorological parameters from March 2013 to February 2022 in Zabol. We also utilized the information gain (IG) method for feature selection. Several measures including accuracy, F1 score, precision, recall, and the area under the curve (AUC), are computed to assess model performance. This study demonstrates the efficacy of DL models, particularly CNN, in predicting the AQI with remarkable accuracy. Our findings reveal that all models effectively classify air quality levels, with an AUC of 0.95 for the good class in both DL and ANN models, significantly outperforming SL models. The AUC values for the hazardous and moderate classes of DL models were also impressive, at 0.90 and 0.83, respectively, underscoring their effectiveness in critical classifications. In terms of performance, CNN achieved an accuracy of 0.60, leading the models, while RF followed closely at 0.58. RNN, GRU, ANN, and SVM each reached an accuracy of 0.57, demonstrating a competitive edge. LSTM and WKNN recorded an accuracy of 0.55, and KNN was slightly lower at 0.53. These results highlight the superior capabilities of DL models in addressing complex air quality classifications, providing invaluable insights for policymakers. By leveraging these advanced techniques, stakeholders can implement more effective strategies to combat air pollution and safeguard public health. It is worth noting that irregular monitoring of air quality data may affect the robustness of our predictions, highlighting the need for more consistent data collection to ensure an accurate representation of pollution levels.