Brave New World by Aldous Huxley is a sort of thought experiment about a future in which, in part through the use of mood-altering drugs, it is possible to engineer happiness. Although the novel was first published in 1932, and in part responded to Huxley's own interest in mind-altering drugs, an interest documented extensively in his 1954 book The Doors of Perception, it is especially relevant to the twenty-first century, when mood-regulating drugs such as Prozac have become increasingly acceptable and widely prescribed.
Huxley posits that it might be possible to create a society in which people are happy, in the sense of free from most external distress and of extreme forms of suffering. He also assumes that in the world, a medication (Soma) can alter people's mood to induce a form of happiness. No one goes hungry, people are healthy, and generally his society works quite well on the average. The cost of this happiness is freedom.
As to which is more important, one might look at Maslow's hierarchy of needs. Helmholtz, Bernard, and John Savage all have their basic low level needs for food, shelter, and security taken care of but are frustrated by their sense that higher level needs are not satisfied.
As to which of these needs, that for freedom or that for happiness is more important, I suspect it depends on your perspective. To someone living in a war zone in Syria or a famine-stricken part of Bangladesh or sub-Saharan Africa, trading limited freedoms for adequate food, shelter, and medical care might seem appealing, but once those basic needs are satisfied, freedom becomes more important.
Also, Huxley, in portraying the malcontents of his putative Utopia, seems to be suggesting in the voice of Savage that the engineered happiness of the World State is eventually stultifying, and that one cannot have true happiness without freedom to choose, and even freedom to experience unhappiness.