Carbon nanomaterials (CNMs) have been the subject of extensive research for their potential applications in various fields, including photovoltaics and medicine. In recent years, researchers have focused their attention on CNMs as their high electrical conductivity, low cost, and large surface area are promising in replacing traditional platinum-based counter electrodes in dye-sensitized solar cells (DSSC). In addition to their electrical properties, CNMs have also displayed antibacterial activity, making them an attractive option for medical applications. The combination of CNMs with metal oxides to form composite materials represents a promising approach with significant potential in various fields, including energy and biology. Here, we introduce porous carbon nanospheres (PCNS) derived from Cocos nucifera L. and its ZnO composite (PCNS/ZnO) as an alternative material, which opens up new research insights for platinum-free counter electrodes. Bifacial DSSCs produced using PCNS-based counter electrodes achieved power conversion efficiencies (PCE) of 3.98% and 2.02% for front and rear illumination, respectively. However, with PCNS/ZnO composite-based counter electrodes, the efficiency of the device increased significantly, producing approximately 5.18% and 4.26% for front and rear illumination, respectively. Moreover, these CNMs have shown potential as antibacterial agents. Compared to PCNS, PCNS/ZnO composites exhibited slightly superior antibacterial activity against tested bacterial strains, including gram-positive Bacillus cereus (B. cereus) and Staphylococcus aureus (S. aureus), and gram-negative Vibrio harveyi (V. harveyi) and Escherichia coli (E. coli) with MIC values of 125, 250, 125, and 62.5 µg/ml, respectively. It is plausible that the outcomes observed were influenced by the synergistic effects of the composite material.