The formation of colours in soap bubbles is due to the phenomenon of

The formation of colours in soap bubbles is due to the phenomenon of

dispersion of light
interference of light
diffraction of light
polarization of light
This question was previously asked in
UPSC CAPF – 2013
B) interference of light
The iridescent colours observed in soap bubbles are a result of the interference of light waves. When light strikes the thin soap film, it reflects off both the outer and inner surfaces. These two reflected waves interfere with each other. Due to the slight difference in the path length traveled by the waves (determined by the thickness of the film and the angle of incidence) and the phase change upon reflection, certain wavelengths of light are constructively interfered (enhanced), while others are destructively interfered (cancelled). This results in the appearance of vibrant colours, which vary depending on the local thickness of the soap film.
This phenomenon is also observed in other thin films, such as oil slicks on water. The specific colour seen at any point on the bubble depends on the thickness of the film at that point and the angle from which it is viewed. As the soap bubble thins (e.g., due to evaporation), the colours change, often displaying white or black just before bursting when the film becomes extremely thin.