The distribution, composition, and diversity of macroinvertebrates (such as Polychaeta), as well as of other aquatic communities, are affected by abiotic and biotic factors and also by mutual interactions among the organisms. Thus, benthic macroinvertebrate communities clearly indicate the ecological conditions of inhabited aquatic ecosystems. Benthic fauna composition in aquatic environments depends mainly on factors such as substratum type, water trophic status, and hydro-period.
Oxygen and depth also constitute essential factors to macroinvertebrate distribution. Density of these organisms is remarkably lower at great depths, but the existence of some species tolerant to low oxygen concentrations is evidenced at these sites. Other important factors for benthic species distribution are the availability of food resources and the interspecific trophic interactions, such as competition and predation.
Habitat complexity can determine the composition of a local community. Diversity of biological communities in more complex sites tends to increase due to the presence of environments with minor stress, ample availability of shelter against predators, and protection against physical disturbances, which serve to assist in survival, recovery, and persistence of the organisms.
I would like to add some references to the excellent answer given by Moslem Sharifinia. There are old papers approaching this question, such as "Several Environmental Factors Influencing the Distribution of the Freshwater Polychaete, Manayunkia speciosa Leidy" by Thomas P. Poe and Deborah C. Stefan, in Chesapeake Science
Vol. 15, No. 4 (Dec., 1974), pp. 235-237 (available here: http://www.jstor.org/discover/10.2307/1350975?sid=21105589784731&uid=4&uid=2), although with freshwater polychaetes. Some more recent work includes Gilles Miron & Erik Kristensen's "Factors influencing the distribution of nereid polychaetes: the sulfide aspect", in Marine Ecology Progress Series 93 (1993): 143-153 (available here: http://www.int-res.com/articles/meps/93/m093p143.pdf). I also found this paper here in ResearchGate: https://www.researchgate.net/publication/248575038_Factors_in_the_distribution_of_intertidal_estuarine_polychaetes_a_field_experiment_with_Nereis_%28Hediste%29_diversicolor_and_Nephtys_hombergi_in_the_Tamar_at_Plymouth but you have to request the full-text to the authors.
Article Factors in the distribution of intertidal, estuarine polycha...
QUIROZ-MARTINEZ, B., FRANÇOIS G. SCHMITT, F.G., DAUVIN, J.C., DEWARUMEZ, J.M., FOVEAU, A. & GARCIA, C.. Distribution patterns of annelid polychaetes species from the continental shelf (0-200 m) in the North Sea, English Channel, Irish Sea and Outer Bristol Channel. Italian Journal of Zoology 78(S1), 324- 332.