Because of advances in Light-Emitting Diodes LEDs and visible-light communication (VLC), future technology is light fidelity. The interference problems with radio frequency (RF) communication was overcome by using visible light communication (VLC) technology, which has higher bandwidth and greater security. On the other hand, the FSO link is affected by complex weather, Where Different atmospheric conditions affect the optical power of the FSO system very significantly, decreasing significantly. The effects of turbulent weather on OCDMA technology are examined in this paper and compared with and without using this technology at different distances in L-Bands in light of the increased number of users. There are various challenges that Li-Fi technology faces in maintaining the system performance with the increase in the number of users. These issues will cause a decrease in the system's performance parameters, such as BER. Further, the challenges that exist are the total bandwidth usage and the number of users without affecting the system. Finally, security should be maintained at the highest level at the lowest cost. With the best results, the research shows that Optical Code division multiple access OCDMA technologies enhance system performance and stability, especially over long distances. On the contrary, the system will fail to function correctly over the same distance if the technology mentioned above is not utilized. For example, the heavy dust, the system achieved approximately from 1.02 * 10-12 to 9.5 * 10-11 with our proposed technology, whereas it achieved approximately from 2.8 * 10-7 to 4 * 10-4 without the proposed technology at a distance ranging from 60m to 160m. the system was tested during heavy fog weather, considered the most challenging situation, with an n attenuation of 340dB/M. The results revealed that the system achieved roughly 1.11*10-12 to 9.25*10-11, but without OCDMA technology, it achieved between 3.8*10-8 and 1.4*10-4 at 20 m to 120 m. These include heavy dust, fog, and moderate attenuation of 340, 242, and 85 dB/m, which have been used.