Photosynthesis offers a convenient means of sustaining biospheres. We quantify the constraints for photosynthesis to be functional on the permanent nightside of tidally locked rocky exoplanets via reflected light from their exomoons. We show that the exomoons must be at least half the size of Earth's moon in order for conventional oxygenic photosynthesis to operate. This scenario of photosynthesis is unlikely for exoplanets around late-type M-dwarfs due to the low likelihood of large exomoons and their orbital instability over long timescales. Subsequently, we investigate the prospects for photosynthesis on habitable exomoons via reflected light from the giant planets that they orbit. Our analysis indicates that such photosynthetic biospheres are potentially sustainable on these moons except those around late-type M-dwarfs. We conclude our analysis by delineating certain physiological and biochemical features of photosynthesis and other carbon fixation pathways, and the likelihood of their evolution on habitable planets and moons.