Although this is the only occasion on which Jesus is shown to be writing, it's in keeping with practices of the time that he'd use the dust to do it. Writing materials were scarce and expensive and those few who could write would, at that time, have done most of it in this ephemeral way. In fact, most writing would then have involved commercial transactions and most of that would have been quick calculations for tallying sums. Many merchants used sand boards for the purpose, portable platforms like checkerboards on which they would strew sand. These had a sturdier and more efficient counterpart in boards that even more closely resembled checkerboards on which counters would be placed for abacus-style calculations. It would be many centuries before writing materials, particularly paper, would become cheap enough to use for tallying sums and recording transactions and writing in sand is too practical entirely to have disappeared even in modern times. Witness this sequence of photos that Dorothea Lange took in rural North Carolina during July 1939.
Her caption for these shots reads "Roadside meeting with Durham County farmer. North Carolina. He gives road directions by drawing the dirt with a stick." My source is the Prints and Photos Div. of the Library of Congress. The photos are in the collections of the Farm Security Administration, Lange's employer at the time.
It's a bit of a disappointment to learn that the account of Jesus and the adulterous woman is now considered to be a late, uncanonical, addition to John's gospel. Like most of the best Bible stories it's compact and hangs together well but is also ambiguous, unsimplistic, morally nuanced. The good guy triumphs over the bad guys but we're left asking what's meant by bad and good. The woman is saved from a horrible death and, we suppose, also learns to save herself from damnation in the afterlife, but I think we have to ask how far to take this idea in which repentance cancels due punishment for those convicted of crimes. And there's question of what is due punishment (which should be taken historically — can't be just be what we now consider appropriate, right?).
Commentators generally take the bending down to write as a rhetorical device. As the interpolation in KJV has it: "as though he heard them not." One could suppose this turning away buys some time in which to consider how to respond. Some say Jesus is demonstrating that he knows the sins of the men who have come to attack him and, as he writes them, they see that he knows. In the brief research I did for this post I didn't find a commentary that says he's demonstrating he knows the law (not the oral but the written law) and knows that stoning is not the approved punishment for adulterous women, but that's a possible interpretation.
For me it's not the dramatic turning away so much or the content of the writing that interests, but the implication that what Jesus has been teaching requires concentration, is important enough that it shouldn't be interrupted. His accusers address him as teacher and teaching is what he's engaged in when they begin their attack. He's using the earth as his blackboard, it's important to him to get across his point, he doesn't want to lose the thread of his argument. He wants to finish what he's doing before he turns his full attention on the scribes and Pharisees with their abject captive. The fact that, after responding to their question, he stoops back down to continue his writing supports this interpretation a bit. But then, if the teaching is so important, why does the story have the students all depart with the accusers so that Jesus is left alone with the woman? I don't think this uncertainty cries for resolution; it it just encourages me to keep thinking about the passage. In the end what sticks in my mind is the focus on writing as a central element in the account and the reminder that much that is written is unfixed, not retained; it is transitory, wiped off the blackboard, scuffed off the ground.