Explanation
Correct answer: D.
Choice D is the best answer. "That…[rain] back onto Mars’s surface" is a relative clause that describes the "bits of molten rock." Forming the clause requires a conjugated, finite verb, and this is the only choice that provides that.
Why the other choices are wrong
Choice A
Choice A is incorrect. "To rain" is an infinitive and can’t serve as the main verb of a clause. A conjugated verb is needed here to form the main verb of the relative clause "that…[rain] back onto Mars’s surface," which describes the "bits of molten rock."
Choice B
Choice B is incorrect. "Raining" is a present participle and, on its own, can’t serve as the main verb of a clause. A conjugated verb is needed here to form the main verb of the relative clause "that…[rain] back onto Mars’s surface," which describes the "bits of molten rock."
Choice C
Choice C is incorrect. "Having rained" is a perfect participle and can’t serve as the main verb of a clause. A conjugated verb is needed here to form the main verb of the relative clause "that…[rain] back onto Mars’s surface," which describes the "bits of molten rock."