Soap lowers surface tension
Pure water has high surface tension and cannot stretch into a stable film. Soap reduces it enough for bubbles to form.
A bubble wall is a molecular sandwich
Each bubble wall is: soap molecules, a thin water layer, soap molecules, with air trapped inside.
Soap molecules are part-water-loving, part-water-hating
This dual nature, hydrophilic head, hydrophobic tail, is why soap molecules line up at the water surface and form stable films.
Myth: the thicker the soap solution, the bigger the bubble
Too much soap makes the film too viscous and unstable. The ideal ratio is carefully balanced for flexibility and strength.