Happiness is linked to knowing because knowing is dominating controlling the environment, other life forms, wether they are vegetal or animal, which proves dominating underlies the feeling of happiness.
Knowing, controlling, dominating, means better odds of survival, means being happy. Being happy is linked to knowing that you have better odds of survival than others.
Many people are happy believing in systems of beliefs that "work" (ie insure their survival and the survival of the loved ones who reinforce by their alliance with them their own survival) simply because..it works. It produces and cover their daily need for gratifications, chemical receipes of hapiness in their brains that allow them to last one more day. Most people are happy because they follow daily routines that produce "well being" in their lives; they couldnt tell why or how they got there, the conditions were just ideal for them, as simple as that. Everything is just fine in their minds, everything has a meaning, an explanation, even what is unexplainable, which is reassuring. These beliefs also make them the good guys while giving a meaning to the ennemies, the bad ones. It justifies everything geographically, temporally and emotionally. Look at how nihilists end -vincent van gogh, nietschze, darwin etc, they all experiment with everything in life, atheism, nihilism, homosexuality, bisexuality etc; they all end crazy because the clear understanding of what is really "going on" actually drives anyone looking for a positive, pure, meaning of life to madness. Religions actually keep people away from madness and the will to destroy the absurd world, because if you re not part of the world, if you dont participate, build, insure its survival, you re actually fighting to destroy it, life is binary, you either build or destroy, if you re not building, you re destroying. And good luck finding out for sure if someone is actually trying to create, help, or destroy.
Anyone interested in understanding nihilism/ atheism and generally how we give a meaning to our lives should read eugene rose's work:
http://www.columbia.edu/cu/augustine/arch/nihilism.html