In Tom Sawyer, and then later in Huck Finn, the relationship between work and play helps shape both the books and their characters in many different ways. However, it is a tension, rather than an outright conflict. The difference? One of the points Twain dramatizes repeatedly is that if you choose to do it, it can be play, rather than work. This is seen most dramatically in scene of whitewashing the fence. Tom must do it, and so it is work—and therefore he doesn't want to do it. He acts as if it were play, and the other boys find it to be play. Therefore, work and play exist in the mind of those doing them. Of course, Tom getting paid to let others wash his fence is also Twain smiling at himself—he gets paid to write, because others want to read his work, even though the reading done in school is work.
On a different and simpler level, play is what boys are allowed to do, and work is what men must do; the boys in the book are negotiating the struggle between the two worlds.