Diseases affecting tomato leaves can severely impact agricultural productivity, as they can reduce crop yields and quality significantly. A swift and dependable identification of these diseases is vital for ensuring prompt interventions and the successful implementation of disease control strategies. This study focus on evaluating and comparing the efficiency of three separate optimizers, such as Adam, RMSProp, and SGD on the pretrained Convolutional Neural Network (CNN) architecture DenseNet121. There has been no previous research that directly compares the performance of Adam, RMSProp, and SGD optimizers on the DenseNet121 model for classifying tomato leaf diseases using the Plant Village dataset. These optimizers are crucial in the training process by influencing the model’s ability to converge and generalize well on new, unseen data. Experimental procedures were performed using a labeled dataset of tomato leaf images, which included healthy leaves and various disease classes. Out of the three optimization techniques tested, the DenseNet121 model trained with the Adam optimizer consistently outperformed the others. It achieved the highest evaluation metrics, with an accuracy of 0.9800, precision of 0.9807, recall of 0.9800, and F1-score of 0.9800 on the test set. These outcomes suggest that the model has a strong and balanced classification performance, capable of correctly identifying disease conditions with minimal errors. Based on these findings, the DenseNet121 architecture combined with the Adam optimizer is considered the optimal model used to recognize various tomato leaf diseases in this study.