With so many books available, on such a wide variety of coding topics, it's impossible to provide a definitive list. So, let's pick out a few that have a strong emphasis on fun.
Books for younger coders are just as applicable for the young at heart. Python for Kids is geared around problem solving, and has a number of related coding puzzles on its website.
If you're looking for something unconventional the Computational Fairy Tales book might fit the bill. First it takes the reader to a world with kingdoms, castles, dragons, goblins, magic spells and other fantasy concepts. Then it encourages the reader to develop a code war chest to overcome numerous challenges, with a view to introducing coding concepts and computer science topics.
Functional programming is an interesting yet challenging aspect of coding. For those wishing to find out more Conrad Barski's Land of Lisp book is an excellent place to start. The numerous practical exercises have an underlying gaming theme, while the informal style and well-paced content is brought to life by a collection of wacky-yet-informative cartoon-style illustrations.