tl;dr: Airports like to sell drinks (and it may increase security)
As described by @jpatokal it is indeed possible to make explosives out of some liquids, and thus airlines used security as a reason to ban all liquids.
Though the amount of terrorist attacks prevented by this is probably in the range of 0-1 (which could of course make it worth the effort), there is a side effect that is easily noticeable:
Since it is harder for people to arrange their own drinks, the number of drinks purchased at an airport increases. I have been unable to find a citation for this but can attest to this from personal experience.
So, preventing people from taking bottles may increase security, but it will definitely increase revenue. And this is at least part of the reason why the rule got enough support to be implemented.