It is challenging to build a deep learning predictive model using traditional data mining methods due to the scarcity of available data, and the model's internal decision-making process is often nonintuitive and difficult to explain. In this work, a directed message passing neural network model with transfer learning (TL) and chemprop interpreter is proposed to improve energy levels prediction and visualization for organic photovoltaic materials. The established model shows the best performance, with coefficient of determination reaching 0.787 for HOMO and 0.822 for LUMO in a small testing set after TL, compared to the other four models. Then, the chemprop interpreter analyzes local and global effects of 12 molecular structures on the energy levels for organic materials. After a comprehensive analysis of the energy level effects of nonfullerene Y-series, IT-series, and other organic materials, 12 new IT-series derivatives are designed. 1,1-dicyano-methylene-3-indanone (IC) end group halogenation can reduce HOMO and LUMO energy levels to varying degrees, while IC end group modified by electronwithdrawing aromatic groups can increase HOMO and LUMO energy levels and obtain relatively smaller electrostatic potential (ESP) to reducing intermolecular interactions. The influence of side-chain modification on energy levels is limited. It is worth mentioning that the predicted results of IT-series derivatives match density functional theory calculations. The model also shows good generalization and transferability for predicting the energy levels of other organic electronic materials. This work not only provides a cost-effective model for predicting the energy levels of organic photovoltaic materials but also explains the potential bridge between molecular structure and electronic properties.