Back in the day, water bottles were a good way for college kids to hide vodka. Michael Vick once tried to sneak marijuana past airport security using a modified water bottle. And now that everyone's favorite water bottle is double-walled stainless steel, there's no telling what's inside.
But does that give cops the right to search your water bottle? The answer, as always: it depends.
Where You Are
The first thing to consider is where you -- and your water bottle -- are. Generally speaking, we have a lesser expectation of privacy in public, and even in our cars, than we do at home. Therefore, police searches in public (like searching your water cooler at the beach) or police searches of a car (even closed containers) are generally more permissible than searches of your home. But still there are limits. A demand that you open your water bottle will need to be backed up by consent or a reasonable suspicion that you've committed or are committing a crime.
What You Say
You can always consent to a search. If you have nothing to hide in that water bottle, you can always allow police to search it. On the flip side, you don't have to consent, and although police may search a water bottle anyway, your lack of consent can come in handy later -- if officers have no reason to perform a search and you don't consent, any evidence they obtain may be inadmissible at trial later; but if you consent, you may forfeit that challenge.
And, in some instances, you may implicitly consent to having your water bottle searched, by entering a sporting event, concert, or other semi-public place.
What They Think
If police have probable cause that a crime has been committed, they may be able to search your water bottle without a warrant. So if officers believe you're intoxicated in public, for example, they may want to find out how you got that way. The police are also permitted to perform searches incident to arrest; meaning that if you've been arrested, officers can search your person and personal effects.
Any time you've been charged with a crime you should contact an attorney, but especially if you believe the charges are based on an illegal search, you'll definitely need an experienced criminal defense lawyer's help.