An article by Jackie Andrade, published in Applied Cognitive Psychology last year, attempts to answer that question. In a study designed to mimic the conditions that lead to doodling, subjects were asked to listen to a long voicemail message and write down the names of people who would be coming to an upcoming party. They were told that the tape would be a little dull, but not to worry about it because it wasn't important to remember any of it afterwards. To make the conditions as much like the real world as possible, all the participants had just finished working for an unrelated study when they were recruited, and were asked for another 5 minutes of their time before they went home.
Some of the participants were given a sheet of paper that had circles and squares printed along the right-hand side and were asked to shade in the shapes as they listened to the tape "to help relieve the boredom." The rest were not given any instruction about doodling. When the participants were finished listening to the tape, they were asked (naturally!) to remember the names of the people who would be attending the party.
In the end, participants who shaded in the shapes were a little better at writing down the names of the party-goers, and at remembering those names after they'd handed in their lists. The shading-in activity appeared to provide them with an edge over the people who just kept a list.
It's a slightly surprising finding, when you consider it in light of all of the studies that suggest multi-tasking reduces the efficiency of people who engage in it. If that's the case, why would doodling make listening or retention any better?
It looks like the brain doesn't treat all multi-tasking conditions the same way. After you learn a task so well that it doesn't require any concentration, it's pretty rare for that task to interfere with the main task. So driving while chewing gum is probably fine, but driving while talking on the cell phone is demonstrably a bad idea.
In the case of this study, the main task the participants were asked to perform was fairly boring. Doodling may have let them stay just interested enough to let them finish the task. It also may have kept participants from engaging in their own diversions, such as daydreaming, which might have compromised their performance even more.
The next time you see a lot of doodling going on in your classroom or meeting, it may be a sign that people are paying more attention.