Pneumonia is a highly contagious lung infection characterized by inflammation of air sacs in one or both the lungs. The air sacs get filled with fluid resulting in fever, cough and difficult breathing. Chest X-ray images are used to detect pneumonia. The manual identification of pneumonia using chest X-ray images is often time-consuming and prone to errors, which may delay diagnosis and treatment. So, a deep learning model is used for detecting the pneumonia without any delays. A Convolutional Neural Network is a type of deep learning model specifically designed for processing images. Two Convo- lutional Neural Network models, EfficientNet-B0 and VGG16, are trained. The model that gives the best accuracy is chosen as the final model. The VGG16 model provides an accuracy value of 89.90% and EfficientNet-B0 model provides an accuracy of 91.51%. This research outcome exhibits that EfficientNet-B0 provides better performance than VGG16. and the study shows that CNN model EfficientNet-B0 can make pneumonia detection more accurate and reliable, helping doctors in their diagnosis and treatment.