In order to address a pressing global health concern, the study examines the effectiveness of different Convolutional Neural Network (CNN) architectures in the automatic diagnosis of pneumonia from chest X-ray pictures. Pneumonia continues to be the primary cause of death for kids, especially in areas with little resources. This study thoroughly compares pre-trained CNN models performance, including VGG16, ResNet50, and EfficientNetB3, with a focus on how well they classify pneumonia cases. EfficientNetB3 achieved the highest accuracy of 92.08%, following ResNet50 with 84.05% accuracy, precision of 84%, recall of 85%, and F1-score of 84%. and at last, VGG16 with an accuracy of 81%, with a recall score of 82% and F1- score of 81% for Pneumonia. We also used a custom CNN model, which achieved an accuracy of 82%. Chest X-ray images from the RSNA Pneumonia Detection Challenge were used as a large dataset. To evaluate the model performance, the study uses strict evaluation measures such as accuracy, sensitivity, specificity, precision, and F1 score. According to the results, there is a great deal of promise for CNN models to improve diagnosis accuracy and, consequently, clinical outcomes. This study's conclusions imply that incorporating cutting-edge deep learning methods into clinical practice may improve the efficiency of pneumonia identification, which in turn may improve the distribution of resources in healthcare settings.