Why are so many coming-of-age movies set in the summer?

Because that’s when teenagers and adolescents are out of school with a certain freedom to pursue love, which often ends in heartbreak. “The Way Way Back” is a summer coming-of-age tale that’s realistic, funny and bittersweet. It’s not only about how its central character matures, but also how his mother faces a decision as an adult.

The focus is on Duncan (Liam James, “2012”), a 14-year-old who faces an utterly miserable summer. His mother (Toni Collette) is divorced and dating a guy named Trent (Steve Carell), who has a daughter just a little older than Duncan. Trent isn’t a monster, but he’s also far from kind, treating Duncan dismissively and obviously remaining self-involved despite his relationship with Duncan’s mom.

At the beginning of the movie, Trent asks Duncan to rate himself on a scale of 1 to 10. “I think you’re a three,” Trent tells Duncan. “Since I've been dating your mom, I don't see you putting yourself out there, bud.”

Duncan ends up accompanying his mom, Trent and Trent’s daughter to Trent’s beach house. Trent’s mother seems to be a woman who defines herself by being in the company of a man and is eager to make the acquaintance of Trent’s neighbors.

Chief among them is Betty (the marvelous Allison Janney), who always has a drink in her hand and gossip to share. Her daughter Susanna (AnnaSophia Robb, “Bridge to Terabithia”) at first appears to be the quintessential sullen teen, but she eventually develops a fondness, or at least a sympathy, for her shy, awkward neighbor.

Duncan has little to do because he doesn’t fit in anywhere. So he finds a bike and rides it to the Water Wizz waterpark, where meets park manager Owen (Sam Rockwell). Owen offers Duncan a job, and, without telling anyone, Duncan accepts. He finds himself becoming a welcome part of the park crew as he continues to feel alienated from those around him at home.

There’s a little of “Adventureland” here, along with “The Perks of Being a Wallflower,” although the latter film is much darker in tone. Still, the characters are fresh, original and charming, particularly Rockwell’s clever, motor-mouthed Owen, who steals every scene in which he appears. Kudos to directors/writers Nat Faxon and Jim Rash. (That’s Faxon who tells the girls to “hold” on the slide so he can get a good look at them and Rash who constantly announces that he’s quitting.)

I hope we’ll be seeing more work soon by this talented duo.