The service states of tunnel lighting will directly affect the lighting conditions, which affect traffic safety. Therefore, it is imperative to evaluate and predict traffic safety accurately in different lighting states. In this research, three hundred experimental scenarios of the service states of tunnel lighting were designed and implemented to evaluate the impact of different service states of tunnel lighting on traffic safety. The evaluation was achieved through a visual identification experiment in a physical tunnel. The experimental results show higher simulated vehicle speeds pose a greater threat to traffic safety. The severity of lighting attenuation contributes to an increased risk to traffic safety. An increase in the number of luminaires failure also poses a greater threat to traffic safety. The newly proposed traffic safety factor was employed to evaluate traffic safety quantitatively in road tunnels. To improve the accuracy and comprehensiveness of the traffic safety factor prediction in different lighting service states, an advanced neural network prediction system was developed. The prediction system was constructed using the Sparrow Search Algorithm (SSA) to optimize Extreme Learning Machine (ELM) neural network, and the dataset from the experiment was used for the prediction model. The SSA-ELM neural network model is a reliable model that can predict the traffic safety factor comprehensively and accurately. The recommended threshold value for the traffic safety factor is 0.6. When the value falls below 0.6, it shows that the service states of tunnel lighting pose a threat to traffic safety in the tunnel. These findings can provide insights into the safe and energy-efficient maintenance of road tunnels.