Can staying hydrated with water aid in digestion and prevent constipation?

Can staying hydrated with water aid in digestion and prevent constipation?