To understand the physics of bottle-flipping, first you need to understand angular momentum. An object's angular momentum depends on its angular velocity (how fast it is spinning) and its moment of inertia (how much its mass is spread out from a central point). When no external torque acts on an object, its angular momentum must be conserved. The classic example of this is a spinning ice skater. If she is first spinning with her arms extended, she has a high moment of inertia (her mass is spread out, away from the center of her body). If she pulls her arms in tightly, her moment of inertia decreases. In order for her angular momentum to stay the same, her angular velocity must increase so she spins faster. You can observe this for yourself in a spinning office chair (see the link in More to explore).
What does that have to do with bottle-flipping? Imagine throwing a rigid object, such as a coin. Gravity will pull the coin back down to the ground. Because the object is solid, the distribution of its mass does not change as it flies and spins through the air, and its moment of inertia and angular velocity remain the same. That makes it very difficult to predict whether the coin will land heads or tails because it keeps spinning as it falls. A water bottle is different, however. It contains liquid water, which is free to slosh around inside the bottle changing the distribution of mass. Just like an ice skater spreading out or pulling in her arms, this changes the bottle's moment of inertia and therefore its angular velocity (because the total angular momentum must stay the same). You can exploit this fact to make it easier to successfully flip a bottle. How? Try this activity to find out!