In choice (A), the pronoun "they" could refer only to "the earthworm," but "they" is plural and "the earthworm" is singular, so there is a pronoun error. We eliminate choice (A), and choice (B) on similar grounds.
In choice (C), part of the meaning of the sentence is lost, because the sentence no longer explicitly states that it's the earthworm that causes the beneficial "effect." We can eliminate choice (C).
In choice (D), some sentence fragments have been mashed together, creating a distorted meaning. The phrase "it has an effect" gives us a subject/verb pair, so that the only subject for the verb "results" could be "water quality," changing the meaning of the sentence.
Choice (E) is clear and accurate. The singular pronoun "its" refers to the singular noun "earthworm."
The correct answer is (E).