It's been said that we are what we choose to be.
There is truth in that, though we must recognize our limitations (and, if possible, make them our strengths). I cannot, at this stage in my career, choose to play first chair violin for the New York Philharmonic or power forward for the San Antonio Spurs. But I can decide to be happy. Or at least to try to be happy.
That we all might have a right to "pursue" happiness is a relatively recent and radical idea. Hoi polloi--subjects, serfs and slaves--no doubt chase after discreet moments of pleasure and relief, but have no expectation of happiness. The default setting for life for the overwhelming majority of souls is, if not abject misery, drudgery and boredom. Happiness is a sometimes thing, to which no one has a right. But sure, you can try.
When Thomas Jefferson wrote in the Declaration that "all men are created equal" and "endowed by their Creator with certain unalienable rights, that among these are life, liberty, and the pursuit of happiness," he was paraphrasing the 17th-century English philosopher John Locke, who held that people were entitled to "life, liberty, and property."
Jefferson likely tweaked the phrase because, by the 18th century, the term "property" had become so associated with slaves that using the word would require a good bit of explanation. So he put his understanding of Locke's idea--that every person (well, every free white male) ought to be able to own and enjoy things--into his own words.
Had he been a bigger hippie, he might have argued we were all free to "follow our bliss."
We ought to consider that Locke came up with the whole "life, liberty and property" concept as a work for hire. He was asked, after the Glorious Revolution of 1689 which overthrew Catholic James II, to write a justification for the revolt by the new joint monarchs of England, William and Mary. If a king was divinely ordained by God to rule, then by what right did the people have to overthrow him?
Locke thought that while governments had a right to rule, they existed to preserve the rights of the people. So it was the duty of the people to resist those governments when they abrogated those rights. Besides, if God was all that fired up to keep papist James II on the throne, then He would have probably done some smiting of the king's enemies. That He didn't, and William and Mary prevailed, was proof of the rightness of the Parliament that offered them the throne as well as the fallibility of the pope.
(We should note that the Glorious Revolution was essentially a power grab by Parliament; in exchange for their crowns, W & M cut a Kevin McCarthy-esque deal in which the powers of the Sovereign were severely limited. The Sovereign was forbidden from mucking around with laws passed by Parliament, imposing taxes without the body's consent, interfering with elections or freedom of speech or objecting to Parliament's actions in the courts. The Glorious Revolution both saved the monarchy--there was no analog to the French Revolution in England--and turned it into an early form of reality entertainment.)
Jefferson probably intended his allusion to Locke's defense of the Glorious Revolution as a jab at George III. Locke's arguments justified his claim to the British throne, but they also legitimized the colonists' resistance to his rule. If Locke was correct, the colonists had a right to reject George III as their king. If Locke was wrong, then George III was an illegitimate ruler and the descendants of James II should rule England.
As for the actual phrase "pursuit of happiness," there's no evidence that Jefferson plagiarized it from boss Tory Samuel Johnson, who had used the phrase in his 1770 essay "The False Alarm," which characterized the American colonists as a bunch of ungrateful crybabies who enjoyed significantly lower levels of taxation than their counterparts in England. (Johnson wasn't wrong.)
Jefferson could be snide like that, but he was probably more familiar with Locke's writing than with Johnson's. (Even then, people seemed more inclined to seek out opinions that ratified their own worldview than opinions that challenged it.) And Locke had, in his 1690 essay "Concerning Human Understanding," written:
"The necessity of pursuing happiness [is] the foundation of liberty ... so the care of ourselves, that we mistake not imaginary for real happiness, is the necessary foundation of our liberty. The stronger ties we have to an unalterable pursuit of happiness ... the more are we free from any necessary determination of our will to any particular action ..." blah blah blah.
Locke is arguing that our liberty depends on being able to determine and strive for whatever it is we think will make us happy.
We know Jefferson read Locke. He certainly read "Concerning Human Understanding."
In any case, the idea of the "pursuit of happiness" cannot be considered--as it sometimes is--a uniquely American invention. Nor should we consider it an original tenet of the American experiment. The words "Life, liberty, and the pursuit of happiness" feel trite, but they were genuinely radical in their day.
While our Constitution explicitly protects life and liberty, it doesn't mention happiness. And the Declaration has no legal standing; it is dictum, not law. Some states (and several other countries) have enshrined a statutory right to pursue happiness, but it wasn't until 100 years ago that the United States Supreme Court recognized the pursuit of happiness at the national level when interpreting the 14th Amendment's protection of the right to liberty.
(It came in Meyer v. Nebraska, where teacher Robert Meyer challenged the constitutionality of a Nebraska law that restricted the teaching of foreign languages. The Court ruled 7-2 for the teacher, and Justice Clark McReynolds, writing for the majority, found in the 14th Amendment's due process clause the freedom to "generally to enjoy those privileges long recognized at common law as essential to the orderly pursuit of happiness by free men." By teaching a foreign language, Meyer was exercising his occupational and intellectual freedoms--essentially pursuing his happiness.)
The Meyer precedent was central to the famous Loving v. Virginia case, in which the Supreme Court, in a 9-0 decision, found unconstitutional a Virginia law forbidding interracial marriage. It was also cited in the Court's majority opinion in the 2015 Obergefell v. Hodges decision, where, in a 5-4 ruling, the Court found bans on marriage for same-sex couples unconstitutional.
You have no right to be happy. You have the right to try.