Because they are a thin film they do interesting things to light. Light passing through a parallel plate of refractive material will be displaced slightly but not otherwise altered form its course. Light passing through a material of variable thickness — prism, lens — gets bent and changed. A prism separates light into different frequencies due to the wavelength dependence of the index of refraction of the material. Lenses do the same thing only they do it around a curve and that makes it all come together in a point instead of spreading out.
Bubbles have the interesting property of being both. The fluid cohering together to form the thin film is not uniform in thickness. The variances in thickness cause the light passing through to be bent and separated like a very thin prism. It’s also a sphere with a semi-graduated index of refraction. That makes it a lens.