The congregation had no water, so they assembled against Moses and Aaron.
Food nourishes the body, but the body needs water in order to absorb the nutrients in the food. similarly, the "food" of the soul is the Torah and its "water" is the Torah's ability to influence all facets of our personalities, all types of people, and all aspects of life.
When the Jewish people's existence was threatened in Egypt, Miriam was the one who ensured that there would be a new generation of Jews to carry on G-d's mission. She both encouraged the Jewish people to continue having children and saved their newborns from Pharaoh's decree. On account of her efforts to ensure that the Torah would continue to "flow" into the next generation, the well existed in her merit.
With her passing, Moses had to assume her role. This teaches us that when other Jews are in physical or spiritual danger we should come to their aid, even if offering this type of assistance is not our forte. When we help others, G-d in turn will help us with all our own needs.