It was hypothesized that life in the ocean originated from "primordial soup", which was a mixture of organic compounds which fermented and the cells germinated. The fermentation process provided the ATP energy needed for growth. This theory has been accepted for many years, but scientists are now taking a second look.
Current research has proven that this hypothesis is not possible at all. The current thinking is cells harnessed geothermal energy from gasses leaking from the earth's crust. The geothermal energy provided an energy gradient for harnessing ATP.
Because of energy constraints on the earliest forms of life the energy must have been harvested through chemiosmosis, because sufficient ATP cannot be made during fermentation.