This research presents the optimization of optical wireless communication (OWC) systems using Optical Code Division Multiple Access (OCDMA) based on Carbon Nanotubes (CNTs), achieving data rates up to terabits per second and significantly lower bit error rates. It highlights the potential of CNTs to enhance performance in OWC networks, meeting future demands for ultrahigh speed internet and digital services while addressing challenges posed by atmospheric conditions on communication reliability. The study emphasizes that CNT-based devices are more energy-efficient compared to traditional silicon-based systems, supporting advanced applications in next-generation optical communications.