"Happy as a sandboy" is obviously a simile for happy / content. Where does it come from and what is the eponymous "sandboy"?
Sandboys were boys or men who drove donkeys selling sand, to put down on the floor. Here's W. Meyler's 1805 poem The Rider and Sand-boy: A Tale to paint a picture of the trade.
The earliest printed citation The Phrase Finder found is Pierce Egan's Real Life in London, 1821:
"...appeared to be as happy as a sand-boy, who had unexpectedly met with good luck in disposing of his hampers full of the above-household commodity. "
I couldn't find anything earlier, but even better, I found a definition from the same period, in a John Badcock's 1823 Slang, a Dictionary of the Turf, the Ring, the Chase, etc.
Sand-boy — all rags and all happiness ; the urchins who drive the sand-laden neddies through our streets, are envied by the capon-eating turtle-loving epicures of these cities. ' As jolly as a sand-boy,' designates a merry fellow who has tasted a drop.
Bonus Victorian speculation!
The phrase was also the subject of speculation in the 19th century journal Notes and Queries (a bit like a Victorian Stack Exchange).
A reply to a query about other obsolete phrases in 3rd Series, Volume XI, June 1, 1867:
Pismire is an ant. - Merry has the sense of active, bustling, referring to the enjoyment derived from rapid motion or active occupation. You have the analogous phrase, " As merry as a grig" (cricket). Jolly is sometimes used in the same way, as for instance, " Jolly as a sand-boy," which is derived from similar movements of small insects found in sand.
In 1888, it's noted:
JOHN COLEBROOK ("Merry as a sand boy"). — More commonly "Jolly as a sand boy." This question has been twice asked in ' N. & Q.' without eliciting a satisfactory answer. See 3rd S. ix. 278, 331 ; 4th S. v. 257.
Here's the first 1866 of these unsatisfactory answers:
And here's the second 1870 unsatisfactory answer:
Charles Dickens' The Old Curiousity Shop was published in 1840 but we have earlier citations of the phrase (and a dictionary definition, no less). It's probably safe to say Dickens took the name from the phrase. Our correspondent believes the jolliness is from being drunk ("potations pottle deep"), rather than the earlier suggestions.
World Wide Words says the sandboys' hard work lasted some 15 hours a days for bad pay:
Their prime characteristic, it seems, was an inexhaustible desire for beer. ... A writer in Appleton’s Journal in the USA in 1872 remarked that the saying presumably arose because “as sand-boys follow a very dry and dusty trade, they are traditionally believed to require a great deal of liquor to moisten their clay”.
The phrases.co.uk syllabus on this expression does not really give a reason for why sandboys were happy, except that they were intoxicated. However, it does clearly state that the sandboys were young men delivering sand, which would then be spread on floors to absorb liquids (like sawdust).