I go out on mountains and trails a lot and I always drink water straight from springs and creeks without problem. Is it true that medieval and ancient people preferred to drink wine, ale or beer because water was unsafe?
More can always be said on this question.
Both these answers come from the excellent Askhistorians FAQ
An answer to the question is it true most people in medieval Europe drank by /u/sunagainstgold tells us that water was usually looked down upon since it was free and it has been documented that people did know to boil water to make it safe.
A more detailed answer on the debunking the myth of middle ages people drinking alcoholic drinks over water due to hygiene is in the answer by /u/Quweniden to the question What factors made beer so important to the establishment of civilisation? What made it a more practical drink than plane water?