Water on Earth actually came from outer space, particularly from ice in comets and meteors. When those comets enter our atmosphere the heat generated on entry vaporizes this ice into the atmosphere. Moslems say that this is what Allah says.
[Quran 2.164] … In the water which Allah sent down from the Heavens and brought with it life to Earth after being dead and gave life in it to every kind of land animal; And in directing the winds; And in the clouds that are enslaved between the Heavens and the Earth; [All these] are Signs for a people who comprehend.
The clouds are enslaved between the Earth and the heavens but the water itself came from the heavens (above the clouds). Here God is not talking about rain (matar or wadk in Arabic) instead God is talking about water (ma-e in Arabic).
In another verse, the Quran says that water originally came from the heavens (above the clouds) in the form of ice. There are mountains in heaven that have ice inside them; those mountains could fall on Earth making a very bright flash:
[Quran 24.43] Can’t you see that Allah makes the clouds move gently, then joins them together, then makes them into a pile? Then you see rain come out from within? And He sends down from heaven mountains with ice inside them; that strike whomever He wishes or miss whoever He wishes; Its flash almost blinds you.
God sent down from the heavens (above the clouds) mountains with ice inside them!!! The clouds are enslaved between the Heavens and the Earth but the water itself originally came from the Heavens (above the clouds) in the form of ice in mountains. However today we know that this is exact because water on Earth actually came from ice in comets and meteors.
Rain hits everyone (no exceptions) however the Quran referred to mountains: “that strike whomever He wishes or miss whoever He wishes”. Of course, the meteor that killed the dinosaurs was the size of a mountain. If we get hit with a meteor the size of a mountain we too will die. It is Gods’ choice that we live or die.
How could an illiterate man who lived 1400 years ago have known that water originally came from ice in comets?