In recent times, visible light communication is an emerging technology that supports high speed data communication for wireless communication systems. However, the performance of the visible light communication system is impaired by inter symbol interference, the time dispersive nature of the channel, and nonlinear features of the light emitting diode that significantly reduces the bit error rate performance. To address these problems, many environments offer a rich infrastructure of light sources for end-to-end communication. In this research paper, an effective routing protocol named the modified grasshopper optimization algorithm is proposed to reduce communication interruptions, and to provide alternative routes in the network without the need of previous topology knowledge. In this research paper, the proposed routing protocol is implemented and analyzed using the MATLAB environment. The experimental result showed that the proposed routing protocol adapts to dynamic changes in the communication networks, like obstacles and shadows. Hence, the proposed protocol achieved better performance in data transmission in terms of throughput, packet delivery ratio, end-to-end delay, and routing overhead. In addition, the performance is analyzed by varying the number of nodes like 50, 100, 250, and 500. From the experimental analysis, the proposed routing protocol achieved maximum of 16.69% and minimum of 2.20% improvement in packet delivery ratio, and minimized 0.80 milliseconds of end-to-end delay compared to the existing optimization algorithms.