Distance from shore influences the amount nutrients in the water. This is because the nutrients is washed off of land into water so the closer to land, the more nutrients.
Sunlight can only penetrate so far underwater, affecting photosynthesis. Plants can only grow where the sun reaches. As the depth increases, water gets colder, loses sunlight, and gains pressure.