The main reason I ask this is because my world's moons both have long periods of darkness based on their phases (see here) so plant life needs to have a way to persist through such a lack of light. I know chemosynthetic bacteria can thrive without light, and there are already species of tube worms that rely on these bacteria in favor of a digestive system. So, what I want to know is, could a plant theoretically rely on chemosynthetic bacteria in the absence of light, and if so, what are the requirements for it to occur? Or, if possible, could plants that can simply conduct both photosynthesis and chemosynthesis exist?
Yes. I think it would work the same as the stuff that's in the soil now. In fact, isn't nitrogen-fixing bacteria an example of bacteria (not fungi) that don't use light?
I think the point you want is to use autotrophs that are not photosynthetic, rather than something that eats and breaks down other material.
Now I see the problem. Chemosynthetic life typically lives in environments that normal stuff doesn't. Where is non-biological energy chemicals going to come from in normal soil?
These chemical energy sources are not very rich, in comparison. So they would become food and not complete well in a mixed situation.
But, you're talking about an alien ecosystem. So work out what's needed so it does work. You mentioned the long darkness. Also, why plants? Maybe think of a lichen-like thing that can host varied and changing populations of autotrophic symbiotes. The green stuff does well in the day; it is replaced with chemosynthetic bacteria at night. Perhaps different ecosystems within the host complete for the best breed based on the particular details of food sources and temperature.
You need one of two things.
Better carbon storage and ability for dormancy in the plants. Then they can synthesize sugar when there is light, and respire when it is dark (as our plants do).
An organelle in the plants different from chloroplasts. They would use H2S (which has higher energy electrons that H2O) to provide the electrons to fix CO2 into sugar.
These plants will not be green, as the purpose of chlorophyll is to collect light. If they conduct both types of autotrophy, (which is certainly possible, some invertebrates have five organelle-like symbionts and plants have two), then they would be (red or) green again.
Indeed, this would be analogous to Riftia and similar tubeworms, or Bathymodiolus mussels, or other benthic invertebrates.