In cities like Cagliari, water is perfectly safe to drink, but if you venture in the wilder places of the island you may want to get bottled water. In the zones close to the mountains, the quality of the tap water is usually way better than in the cities as it comes directly from the source, or near the coast.