The automated identification of lung disorders has greatly improved due to the growing availability of chest X-ray (CXR) datasets and developments in deep learning. This study investigates the use of three deep learning models for CXR image classification: ConvNext, Swin Transformer, and EfficientFormer. The models were trained and assessed using a dataset of 78,400 CXR pictures that were sourced ethically. While Swin Transformer presents a hierarchical visual Transformer with a shifted window mechanism for effective feature extraction, ConvNext, a CNN-based architecture, enhances conventional convolutional networks. EfficientFormer is a lightweight vision Transformer that is especially well-suited for medical imaging applications because it strikes a compromise between accuracy and computing efficiency. The models were assessed using common evaluation metrics, including F1 score, sensitivity, specificity, and accuracy. EfficientFormer outperformed the other models, according to the results, with an F1 score of 98.17, 98.12% accuracy, 97.9% sensitivity, and 98.34% specificity. On the other hand, ConvNext achieved 96.12% accuracy, 95.8% sensitivity, 96.4% specificity, and an F1 score of 96.1, while Swin Transformer scored 95% accuracy, 94.5% sensitivity, 95.2% specificity, and 94.81. These findings show how advanced deep learning architectures can enhance automated disease detection from CXR images, providing a potentially helpful tool for clinical decision-making and early lung disease diagnosis.