Question: For example, several missions have been launched just to find ice at the lunar poles. Why do astronomers and space agencies care so much about there being ice somewhere?

Answer: 
Water ice is more interesting than ammonia or carbon by a landslide, and *liquid* water would be that much more interesting still!

Water (in liquid form) is critical for life on Earth. No form of life that we know of can live without water. Similarly, just about everywhere we find water on Earth we find life. That makes it really compelling to search out elsewhere in the universe in hopes of finding life.

Specifically, since we don't see any obvious macroscopic alien life (so far), and since we know that life began (or at least took its first foothold) on Earth in water, we presume that our best hope of finding microscopic life is in water, and evidence of it may be frozen in ice.

### Other reasons to seek out water ice

* Ice may preserve really old stuff that tells us history about the primordial solar system.
* Ice behaves differently to rock and gives us a different perspective on any geologic changes.
* Water ice has practical uses. Especially for human visitors.
	+ can be used to make oxygen.
	+ can be used to make rocket fuel.
* Water is heavy, and any you can find there you don't have to bring with you.
* Given the moon's distance to the sun and lack of atmosphere, water ice is volatile and would normally be lost to space. But some permanently shadowed areas exist at the poles due to craters allowing water to persist in extremely cold frozen form, giving hope for easy extraction of water ice *from the surface*.

NASA's perspective on lunar ice
-------------------------------

> 
> Why is ice on the Moon important?
> ---------------------------------
> 
> 
> The ice could represent relatively pristine cometary or asteroid material which has existed on the Moon for millions or billions of years. A robotic sample return mission could bring ice back to Earth for study, perhaps followed by a human mission for more detailed sampling. The simple fact that the ice is there will help scientists constrain models of impacts on the lunar surface and the effects of meteorite gardening, photodissociation, and solar wind sputtering on the Moon. Beyond the scientifically intriguing aspects, deposits of ice on the Moon would have many practical aspects for future manned lunar exploration. There is no other source of water on the Moon, and shipping water to the Moon for use by humans would be extremely expensive (\$2,000 to \$20,000 per kg). The lunar water could also serve as a source of oxygen, another vital material not readily found on the Moon, and hydrogen, which could be used as rocket fuel. Paul Spudis, one of the scientists who took part in the Clementine study, referred to the lunar ice deposit as possibly "the most valuable piece of real estate in the solar system". It appears that in addition to the permanently shadowed areas there are some higher areas such as crater rims which are permanently exposed to sunlight and could serve as a source of power for future missions. [source](https://nssdc.gsfc.nasa.gov/planetary/ice/ice_moon.html)
> 
> 
>
Other answers have discussed water already, so I'll mention other ices.

Life needs enormous quantities of carbon and nitrogen, respectively found in the ices methane and ammonia, plus nitrogen is itself an ice in some environments. In fact, ammonia is even more useful to life than elemental nitrogen, although certain bacteria can convert nitrogen to other compounds. Carbon dioxide, also found as an ice, has [any number of chemical applications](https://en.wikipedia.org/wiki/Carbon_dioxide#Applications) (including production of the [also very useful carbon monoxide](https://en.wikipedia.org/wiki/Carbon_monoxide#Use)), biological or otherwise.

There are also non-biological applications, such as using hydrocarbons to make plastics. These are useful for 3D printing that would be vital to automate the scaling of *in situ* construction. As an added bonus, plastic would provide a lightweight construction option in low-gravity environments.

The ices can even be used as fuel: burning methane in oxygen makes carbon dioxide, which photosynthesis needs as fuel, and burning ammonia in oxygen makes nitrogen (which may be included in artificial Earth-like air) and water. True, this won't be what powers a settlement, partly due to the question of where the oxygen comes from, partly because we'd get far more power from solar, *geo*thermal (in some locations, for want of a better prefix), fission or even fusion one day. But chemical fuels can be convenient in certain contexts. Besides, some ices contain hydrogen, which would be important in a fusion economy.

There are also sulphur-compound ices, such as hydrogen sulphide and sulphur dioxide. Sulphur is another vital element in biology. It may also be useful to trigger a greenhouse effect (e.g. [on Mars](https://en.wikipedia.org/wiki/Terraforming_of_Mars#Use_of_fluorine_compounds), where its compounds are abundant), as sulphur hexafluoride is the most potent known greenhouse gas, plus it's non-toxic at low levels.

In light of the above ideas, the most biologically important element ices *don't* provide is phosphorus.