Forty-hertz light flicker stimulation has been proven to reduce neurodegeneration, but its effect on optic nerve regeneration is unclear. This study explores the effect of 40-Hz light flicker in promoting optic nerve regeneration in zebrafish and investigates the underlying mechanisms. Wild-type and mpeg1:EGFP zebrafish were used to establish a model of optic nerve crush. Biocytin tracing and hematoxylin and eosin staining were employed to observe whether 40-Hz light flicker promotes regeneration of retinal ganglion cell axons and dendrites. Optomotor and optokinetic responses were evaluated to assess recovery of visual function. Immunofluorescence staining of mpeg1:EGFP zebrafish was performed to observe changes in microglia. Differentially expressed genes that promote optic nerve regeneration following 40-Hz light flicker stimulation were identified and validated through RNA-sequencing analysis and quantitative real-time PCR (qRT-PCR). Zebrafish exhibited spontaneous optic nerve regeneration after optic nerve injury and restored visual function. We observed that 40-Hz light flicker significantly activated microglia following optic nerve injury and promoted regeneration of retinal ganglion cell axons and dendrites, as well as recovery of visual function. Transcriptomics and qRT-PCR analyses revealed that 40-Hz light flicker increased the expression of genes associated with neuronal plasticity, including bdnf, npas4a, fosab, fosb, egr4, and ier2a. To our knowledge, this study is the first to demonstrate that 40-Hz light flicker stimulation promotes regeneration of retinal ganglion cell axons and dendrites and recovery of visual function in zebrafish, which is associated with microglial activation and enhancement of neural plasticity.