Seaweed is a term used for several forms of multicellular marine algae. Red algae, Green algae and Brown algae are commonly considered to be seaweed. Seaweed gets its energy from photosynthesis just as plants do.Source: Wikipedia
Two specific environmental requirements dominate seaweed ecology. These are the presence of seawater (or at least brackish water) and the presence of enough light for photosynthesis. Often, a firm attachment point is also needed.
For this reason, seaweeds can be found in the littoral zone of the sea. Within that zone, they are more frequent on a rocky shore, than on sand.
Another common requirement is a firm attachment point. As a result, seaweeds most commonly inhabit the littoral zone and within that zone more frequently on rocky shores than on sand or shingle. Seaweeds occupy a wide range of ecological niches. The highest elevation is only wetted by the tops of sea spray, the lowest is several meters deep. In some areas, littoral seaweeds can extend several miles out to sea. The limiting factor in such cases is sunlight availability. The deepest living seaweeds are the various kelps.
A number of species such as Sargassum have adapted to a fully planktonic niche and are free-floating, depending on gas-filled sacs to maintain an acceptable depth.
Others have adapted to live in tidal rock pools. In this niche seaweeds must withstand rapidly changing temperature and salinity and even occasional drying.