Smart green buildings (SGBs) are composed of numerous services and offer hopeful solutions to the world's continuous and rapid urbanization. Conventional data transmission systems are insufficient to deliver acceptable services because to the sudden surge in high-quality information transmission requirements over long distance for numerous linked residents in SGBs. Consequently, a hybrid next generation passive optical network (NGPON) along with visible light communication (VLC) indoor/outdoor broadcast network is presented in this work to increase the reliability with intelligence, exalted overall efficiency, cost efficiency, and security of SGBs. Bidirectional PON-VLC system incorporates the time and wavelength division multiplexing (TWDM), wavelength division multiplexing (WDM) and optical code division multiplexing (OCDM) techniques. In order to improve system performance, various OCDM codes are used in this work at 10/2.5 Gbps per channel throughput via fiber-VLC channels. According to the simulation results, the modified new zero cross-correlation (MNZCC) code performs better than previous codes and supports 200 active residents at reliable 100 km fiber along with 5 m VLC range. Furthermore, by expanding the received aperture diameter to 25 cm, VLC coverage may be increased till 10 m. Moreover, it provides adequate receiver sensitivities of − 13 to − 12 dB in uplink with − 9.8 to − 6 dBm in downlink for 200 to 600 fields of view angles compared to 00 view angle having sensitivity of − 15 dBm. Additionally, the numerical analysis and comparison performance show that PON-VLC outperforms fiber-VLC link-based scenarios when it comes to noise and channel impairments.