Ingmar Bergman was in a bad spot in 1955. He'd been making features for over a decade and had yet to have a hit. He thought he had stomach cancer. He was on the brink of suicide. He decided to make a romantic comedy.
Smiles of a Summer Night was Bergman's first international hit, the producers having taken it to Cannes without Bergman's knowledge. People loved the film, and fell in love with Bergman, an interesting development considering his next hit was Seventh Seal, and while this was not his last comedy, he's principally known for existential dramas in Seal's vein not lighter work like this.