During their larval stage fish are in the process of developing fins, scales and organs, and they generally lack physical defenses. Due to their small size and weak swimming capabilities they are particularly vulnerable to predation, thus many have evolved transparency as a method of camouflage.
Transparency is one of the few forms of camouflage possible in a habitat with a homogeneous background and no surface characteristics to blend with. Many fish species are transparent only as larvae, but other aquatic species, like some amphipods and cephalopods, remain transparent throughout their entire life. Most tissue, with the exception of eyes and guts, can be transparent. Eyes must have pigment to absorb light and function, while transparent guts are revealed by their contents (Johnsen 2010).
Photo source: FISHBIO