The majority of bacteria in the sea are photosynthetic bacteria; indeed, the majority of all organisms in the sea are photosynthetic bacteria. The most common type of photosynthetic bacteria are cyanobacteria (with the two most common species of cyanobacteria being Prochlorococcus and Synechoccus). Despite being simple, single cell organisms, cyanobacteria create their nutrients through photosynthesis in a manner similar to plants: they take in sunlight, water and carbon dioxide in order to make nutrients that power their cell's functions.
Some bacteria in the ocean has been found to be harmful to human beings. These include vibrio cholerae, which causes cholera, and vibrio vulnificus, which causes the flesh eating disease called necrotizing fasciitis. However, because these bacteria did not evolve on the land, their primary function is not to infect human beings. Instead, they are "heterotrophos," which means they get their sustenance from other living organisms (as opposed to "autotrophs," which can make their own food, like cyanobacteria). These bacteria would normally infect other multicellular, sea-based lifeforms, like fish.
Bacteria-like organisms have also been discovered in conditions which were previously thought to be inhospitable to all life, such as deep sea hydrothermal vents. These organisms, also called thermophiles, appear to subsist entirely on minerals, or they make their own food through a process called "chemosynthesis," which involves making nutrients from carbon by using nitrogen (as opposed to sunlight) as an energy source. All bacteria used to be classified in the Monera Kingdom, however, scientists have proposed a new kingdom for these organisms called the Archaea Kingdom.
Bacteria have an extremely important role in the sea's food chain, as they are the bottom rung. Other micro-organisms, such as protists (which are more complex single-celled organisms) eat cyanobacteria. These protists in turn at the food source for multi-cellular organisms like fish. Additionally, cyanobacteria serve a crucial role in the world's ecosystem as they (even more so than terrestrial plants) are the main source of oxygen in the atmosphere.