Honestly, my kid brings this home from the library at least once a month, so I know it by heart at this point. It's a really fun, simple adventure from a child's perspective. The main plot follows a boy named Jeremy Jacob who's building a sandcastle when a pirate ship sails up. The pirates, led by Captain Braid Beard, are impressed with his digging skills because they need someone to bury their treasure.
They basically recruit him for the day, and he gets a taste of the pirate life—no manners, no bedtime, all the fun stuff. But when a storm hits, Jeremy realizes there are downsides, like missing tuck-ins and the scary weather. The heart of it is him helping them bury the chest, then deciding the pirate life, while exciting, isn't for him. He goes home, but with the treasure map hidden in his backyard, which is a perfect ending for a kid's imagination.