Just that...a lad who went around town hawking sand. Housewives doubtless used it as a scouring agent, it would have been sprinkled on stable-floors etc. The phrase first appeared in exactly the 'happy' form in a publication called 'Life in London' in 1821. That referred to someone who "appeared to be as happy as a sand-boy who had unexpectedly met with good luck in disposing of his hampers" of sand.
Ah...that'd be telling, Kit! Seriously, though, I do have an excellent set of reference-sources. That - plus an extended education, a good memory and six decades of voracious reading - usually enables me to come up with some sort of response to questions that interest me. Thank you kindly for your comment.
I was told way back when that "happy as a sand boy" referred to boys employed at pubs in Victorian times. They cleaned the floors of pubs (sawdust or sand covered) and if they found a coin they were (naturally) happy.