Consider this your first class in ice wizardy 101.
This is an example of supercooling – the process by which a very pure liquid is chilled to a temperature just below its usual freezing point without actually making the jump to its solid state. Bottled water is perfect for this, especially the kind that's been purified via reverse osmosis, a process that strips water of all its particulates. Particulates can act as "seed crystals," or "nuclei," to which a liquid phase on the cusp of becoming solid can attach and crystalize around. In this video, a seed crystal is introduced in the form of a cube of already-frozen water. As soon as it's introduced, the liquid phase rapidly crystallizes and attaches to the solid one, kicking off a chain reaction of ice-formation.
The bottle-flick is a little trickier.
If I had to guess, I'd say tapping the water bottle leads to a momentary spike in pressure. Because water solidifies more easily at higher pressure, the flick causes a seed crystal to form, which in turn triggers a cascade of ice-formation. [Ed. note: Wow, am I ashamed. It is true that, generally speaking, solid phases are more dense than liquid ones, and that increasing pressure therefore raises the freezing point. Water, however, is a notable exception to this rule, in that its solid phase is actually less dense than its liquid one. This is why ice floats in liquid water, why fish at the bottom of lakes (where pressure is higher) don't get frozen solid in the dead of winter, and why a momentary spike in pressure would most definitely not coax the water into solid form. On the contrary, increasing the pressure in the bottle would actually work to keep the water in its liquid phase. This is gen chem, folks. I blame my temporary mental lapse on a lack of coffee. So again, I implore any physical chemists out there to weigh in: what's going on here??? So far, I like the answer floated by Improbable, who ventures that "it may be crystallizing due to tiny bubbles of air being created."] (Though I suppose this could just as easily be achieved by actually squeezing the bottle. Any physicists or chemists care to weigh in?)