A dive log book is used by a scuba diver to record the details of dives they have done. This serves many purposes that are both safety focused and personal.
From a purely personal view point, as you progress through your training you should keep a close eye on your air consumption, weighting, and use of equipment. Seeing how you improve and react to different diving conditions and events will help you become an efficient, and safe diver. Only if you log these down will you remember them. Additionally, in your early days, when you go on holiday you should expect to take your log book and certification cards to prove your competence to go diving. A dive center will want to see proof that you can handle the diving conditions.
A log book is also a great way to journal your experiences, sightings, new buddies, travels, and it will serve as a great walk (or swim!) down memory lane.