As the tuning fork bends outward in its vibration, it squeezes together the air molecules in its path (click to enlarge diagram below). These molecules, in turn, squeeze the molecules next to them, and so on. In a sort of domino effect, a pulse of compression (a sound wave) travels down into the tube. The compression wave reflects off the surface of the water within the tube and then travels back up the tube (Note: in the diagram below, the water surface is referred to as the "bottom" of the tube).
When the compression wave reaches the mouth of the tube, it expands outward into the air. This expansion of the air doesn’t stop when it reaches the end of the tube, and the air molecules overshoot the open end of the tube. This produces a wave of expanded air that travels back down the tube, bounces off the water, and returns to the end of the tube. Air rushes into this expansion to create a compression. This process repeats over and over again.
If the tuning fork creates a new compression at the same time an existing compression reaches the top of the tube, the two compressions combine and the sound gets louder. This is known as resonance.
When you change the effective length of the tube by moving it up and or down in the water, you change how long it takes for a sound wave to travel down and back up the tube. The sound wave is only synchronized with the tuning fork at certain pipe lengths.
For higher frequencies, the tube needs to be shorter to resonate. The sound wave has to bounce off the water and return sooner to be in sync with the tuning fork. All sound waves travel at the same speed in air (about 350 meters per second), so the only way to get the sound wave back to the tuning fork sooner is to make the tube shorter.
A pulse that starts at the tuning fork as a compression makes four complete transits of the tube (down as a compression, up as a compression, down as an expansion, up as an expansion) before it returns to the tuning fork as a compression. This means that one transit of the tube takes one-quarter of a tuning-fork cycle, or that one-quarter of a wavelength of sound will fit into the tube length. That means if you multiply the length of the tube by four, you will get the wavelength of the sound made by your tuning fork.
Be aware, though, that for a particular tuning fork, there are other resonances of the tube at tube lengths of 3/4 wavelength, 5/4 wavelength, and so on. Search for the shortest length of the tube that produces resonance: This will be 1/4 wavelength.