Symbolism, Imagery, Allegory
We are a sentimental bunch, so we totally understand why Will Henry is so attached to his hat. His father gave it to him before he died, and it's the one thing that he has left from his life before he came to live with Dr. Warthrop, so it's precious to him. Sometimes this is a source of comfort, but sometimes it's a sad reminder of the life he could have had:
He did pull the hat from my head, however, and hung it upon the peg on the wall. The sight of my tattered little hat hanging forlornly on that peg was too much for me. It represented all that I had lost. To disappoint him in my lack of fortitude and manly stoicism was unthinkable, yet I could not bear it, the sight of that hat and the memories it represented juxtaposed against the surreal horror of the preceding hours. I burst into tears, curling into a sobbing ball and clutching my stomach as he towered over me, making no move to comfort or console, but studying me with the same intense curiosity as he had the testicles of the male Anthropophagus. (2.33)
Even Will Henry sees that his hat is a representation of everything that he's lost. But he hasn't just lost his parents—he's also lost his chance at childhood. His hat, which is far too snug, is a symbol for how Will Henry's outgrown his childlike innocence.
"I'm not a child," I said.
"Not a child, eh? Then these old eyes make a liar of Erasmus Gray! Let me have a closer look…"
He lifted my tattered little hat and squinted down at my
face, a smile playing on his lips, and, despite myself, so comical was his expression of earnest study, I caught myself smiling back. "Ack! You're right, not a child—a fine young man, then! D'ye know what I think it is that fooled me, William Henry? It's this hat! It's much too small for a strapping young man such as yourself. A fully grown man should have a man's full-grown hat!"
With one hand he held my little hat, and with the other he dropped his large floppy hat onto my head. It fell over my eyes and nose, much to his delight; his chuckles grew louder, and the cart quivered with the aftershocks of his mirth. I pushed back the hat and saw him looming above me, his spectral frame silhouetted against the velvet sky, my own tiny hat now perched upon his balding head. I found myself giggling right along with him.
"What do ye think, Will Henry? Is it true the clothes make the man? For now I do feel fifty years younger—by Jehoshaphat I do!" (3.28-32)
In this one moment of joviality Erasmus Gray has hit the nail on the head: Will Henry, like his hat, is too small for the job he's trying to do. He should be out playing stickball and going to school with his friends, not performing necropsies and hunting down voracious man-eaters. He's only twelve years old, after all.
At the end of the book, in a rare example of being observant (and perhaps even sentimental), Dr. Warthrop has a new hat made for Will Henry:
I did not notice it at first in my haste (the baker's would be closing in less than an hour). I had changed and was reaching for my little hat upon its peg, when I happened to glance down and see it hanging on the bedpost: It was a brand-new hat, noticeably larger than the tattered, mud-stained cousin now in my quivering hand. What was this? I picked it up, turned it over, and saw embroidered on the inner lining, in golden thread, my initials: W.J.H. (13.197)
This hat symbolizes new beginnings. Instead of clinging to the past with the desperate grip of a child, Will Henry chooses to go forward, in a more grown-up hat—one that actually fits him. And since it comes from Dr. Warthrop, we can see this new hat as also suggesting that they'll go forward a bit more together than they have up until now, when Will Henry's basically just been a servant to the doc:
"What have you got there, Will Henry?" he inquired without taking his eyes from the purifying pyre.
I looked down at the two hats lying side by side in my lap.
[…]
"My hat, sir," I answered.
"Which one, Will Henry? That is the question."
The fire popped and crackled, snapped and growled. That is it, thought I. A fire destroys, but it also purifies.
I tossed my old hat into the center of the flames. (13.202-207)
Fire is what destroyed Will Henry's family and his previous life, but now fire helps purify him so that he can move on. By burning his old hat he is finally shedding his cloak of mourning and embracing his future, whatever it will hold.