In almost every picture I've seen of WWI machine gun squads, they're using water-cooled machine guns (judging by the huge tanks around the barrels). But in WWII, it seems that there was a switch overall to air-cooled guns, such as the Browning M1919 for the US and Germany's infamous MG42. What were the reasons for this, and am I mistaken in any way? Was one type of machine gun actually predominantly used over another in either war?
Air cooled guns are much lighter. For instance, the M1917 weighs 103 lbs but its air cooled descendant the M1919 only weighs 31 lbs. That's a lot of weight the gun team doesn't have to carry, making them more mobile or letting them carry more ammunition.
On the other hand, water cooled machine guns were far from dead in the 1940s. In 1942 Sargent Mitchell Paige used 4 M1917s to singlehandedly fend off an entire Japanese regiment, for which he was awarded the medal of honor. Water cooled machine guns can sustain an almost continuous volume of fire from without overheating or requiring barrel changes, making them ideal defensive weapons. However, modern warfare's increasing emphasis on mobility eventually saw their downfall. The M1917 continued to see use all the way to the Korean war, and still sees occasional use by various guerrilla forces today.
Are you sure the WWI machine guns are not air cooled with a cooling shroud? The principal light machine gun used by the British in the second half of the war was the Lewis gun, an air cooled machine gun with a barrel that looks similiar to a water cooled gun.
Consider the changes in the nature of warfare between the two wars (the advent of superior aircraft and tanks, the notion of blitzkrieg, etc.). WWII is well known to be much more mobile and dynamic than WWI.
WWI is known for the trenches. The epitome of a static, grinding war. You want reliability in the face of all that mud and death. Moreover, firing 10,000 rounds in a row without a barrel exploding from heat is important when hundreds or thousands of men are charging at you across No Man's Land.
In a fluid, mobile theater like WWII Europe (on either front!), you do not want huge, heavy, water cooled guns. You will much more gladly exchange a little reliability (the soldiers will still have their basic service rifles, SMGs, or carbines after all) for a lot of mobility when suddenly a dozen Germans can hop out of a truck and take cover in the urban areas where the worst fighting took place.