We don’t know if life started in the light though and then migrated to the vents and adapted. My memory of it is that this is an unanswered question so far.
We know that life is older than photosynthesis. I'm not aware of another light-dependent metabolic process that could predate chemosynthesis.
Its a good hypothesis that life start at deep volcanic vents. Geologist Robert Hazen conducted lab experiments showing that all steps of the metabolic citric cycle occur in this environment without needing catalytic enzymes. Chemical reduction of magma provides the energy. As life developed enzymes to improve metabolism, it could migrate to colder, lower pressure environments.