The phrase (as) happy as a clam means well pleased, quite contented—cf. also happy as a sandboy and happy as Larry. In Dictionary of English Phrases (2008), Robert Allen explains:
This American simile is more understandable in its full form, happy as a clam in high water (or at high tide). In these conditions, clams are able to feed and are relatively safe from capture, which has to be done at low tide.
This full form appeared for example in High Life in New York (1843), by the American author Ann Stephens (1810-86), writing under the pseudonym of Jonathan Slick, Esq.:
A lot of folks dressed of in short jackets and trousers cut off at the knees, come a dancing out of the house, and begun tu [sic] talk all at once, and chatter and laugh together as chipper as a flock of birds. They seemed as happy as clams in high water; and the fellers skipped and hung round the gals like good fellers.
However, the shorter form is recorded earlier and was already well established in 1834 when the following was published in Harvardiana, a literary journal administered by Harvard University undergraduates.
There are few things in this incorrigible world of ours that I so utterly detest, as an indifferent person. […]
I once had a friend who was blessed with this happy disposition. […] If there were two ways of doing a thing, he never could do it, because he would never have any particular reason for choosing either. Nothing disturbed him; he was proof against insult and injury, for he seemed not to feel or understand them. I do not know to whom the proverb “as happy as a clam” could be more appropriately applied. He never had an enemy, for the annoyance he gave was so purely passive, that you always found yourself reduced to the disagreeable predicament of quarrelling alone.
In the same issue, an article titled A Chapter on Comfort contains:
Nothing can be in reality more fatal to comfort than sensualism, if carried to an undue extent; and he must be dull and spiritless indeed, who could long derive comfort from mere inaction. He could not even enjoy that peculiar degree of satisfaction, usually denoted by the phrase “as happy as a clam,” unless, indeed, he were perfectly on a level with that respectable animal in point of intellect.
The full form was recorded by John Russell Bartlett in Dictionary of Americanisms. A glossary of words and phrases, usually regarded as peculiar to the United States (1848):
“As happy as a clam at high water,” is a very common expression in those parts of the coast of New England where clams are found.
In the 1840s, the American poet John Godfrey Saxe (1816-87) wrote a satirical Sonnet to a Clam:
Dum tacent clamant¹
Inglorious friend! most confident I am
Thy life is one of very little ease;
Albeit men mock thee with their similes
And prate of being “happy as a clam!”
What though thy shell protects thy fragile head
From the sharp bailiffs of the briny sea?
Thy valves are, sure, no safety-valves to thee,
While rakes are free to desecrate thy bed,
And bear thee off—as foemen take their spoil—
Far from thy friends and family to roam;
Forced, like a Hessian², from thy native home,
To meet destruction in a foreign broil!
Though thou art tender yet thy humble bard
Declares, O clam! thy case is shocking hard!
¹ The Latin Dum tacent clamant means While silent, they shout aloud.
² The Hessians were the 18th-century German auxiliaries contracted for military service by the British government; about 30,000 of them fought for the British during the War of American Independence.