It is clear that the latter sentence "It would be better if you drank all the water" is referred to an imagined situation (if you drank all the water) and the possible result of this situation (It would be better.)
In other terms, your second sentence is a "conditional sentence."
In this light, you have to follow the rules governing the associated grammatical structures, which in this case are referred to the second conditional.
We use the second conditional to talk about the possible result of an imagined situation in the present or future.
The form of the second conditional is the following:
conditional clause → if + past simple
main clause → modal verb with future-in-the-past meaning
That said, your second sentence is correct, while the first one does not follow the above rules.
However, if you rewrite the first sentence in this way "It will be better if you drink all the water", it works.
"It will be better if you drink all the water" is referred to future result (It will be better) of an imagined future situation (if you drink all the water), when we believe the imagined situation is quite likely.
So, replacing "would" with "will," your first sentence is still a conditional sentence which structure is named first conditional:
conditional clause → if + present simple
main clause → modal verb with future meaning
Reference: English Grammar Today, Cambridge.