Seawater contains a lot of sulfur, especially compared to most soils and to the atmosphere. In these marine environments, some types of bacteria act to reduce sulfur primarily in the form of sulphate, often in a chemosynthetic reaction in anaerobic conditions, substituting sulfur for oxygen to generate the electrons required, to produce the carbon-based compounds they need to survive.
To put it in slightly less technical terms, certain types of bacteria can, in conditions without either light nor oxygen as is found in the depths of the ocean, create the energy they require through a series of chemical reactions using sulfur. This is very different from life here on the surface, where life forms require both light and oxygen to survive. Granted a majority of life forms depend on photosynthetic and not chemosynthetic reactions to power themselves anyway, as chemosynthetic-based organisms are only really common around hydrothermal deep sea vents, but it's still a fascinating evolutionary adaptation that enables populations of animals where we would otherwise think nothing could survive.
There are also some bacteria that have photosynthetic yet anaerobic processes, primarily in estuaries. Here, it is most useful to aid in decomposition of (carbon-based) organic materials, which otherwise typically requires oxygen which is not available in certain parts of estuaries due to poor water mixing.