Every year, each solar panel suffers an efficiency loss of 0.5% to 1%. This degradation of solar panels arises due to environmental and electrical faults. A timely and accurate diagnosis of environmental faults reduces the damage caused by faults on the panel. In recent years, deep learning precisely convolutional neural networks have achieved wonderful results in many applications. This work is focused on finely tuning pretrained models of convolutional neural networks, especially AlexNet, GoogleNet, and SqueezeNet. Based on the performance metrics, SqueezeNet is used for training thermal images of solar panels and for the classification of environmental faults. The results obtained show that SqueezeNet has a significant testing accuracy of 99.74% and F1 score of 0.9818, which make the model successful in identifying environmental faults in solar panels and help users to protect the panels.