How does the happiness affect the population in Stellaris?
Our empire is at a crossroads, we found an elixir that can boost our people happiness by +15%.
How will this affect our empire?
This answer was made during version 1.0 and is outdated, especially after the planetary rework in 2.2 (Le Guin).
There are three benefits to a happy population.
First, a happy population is more productive. At 80% happiness and above, populations are more productive whereas below 50% there are penalties.
Second, happiness affects the ethics divergence of the population. When the population are unhappy with your rule, they are more likely to adopt ethics different from yours (which can often make them unhappier, as they will then disagree with more policies).
A table of the modifiers can be found here: http://www.stellariswiki.com/Population#Happiness_modifiers
Finally, an unhappy population is more likely to join factions and cause trouble.
The +15% bonus will be extremely effective if you want to take over planets as it helps offset the negative modifiers for conquering them. It's less useful for your content citizens unless you combine it with another happiness increase, such as the Spiritualist ethic. There is no difference between 60% (the default) and 75%- you need to somehow get to 80% for any effect.
If you do have another +5%, the +10% to all production from being happy would be a significant bonus, and probably more useful than increasing leaders' lifespans.
This answer is for version 2.2 "Le Guin". The main impact of pop happiness is its effect on planetary stability through a mechanic called approval rating. The approval rating of the population on a planet is a function of their happiness and their political power: in a stratified society, pops in lower strata don't matter as much as those in higher strata.
Stability has some effects that are similar to the old effects of pop happiness: high stability gives job production bonuses, low stability production penalties. High stability also increases Trade Value. High stability adds immigration to the planet (increasing pop growth) while low stability adds emigration (slowing pop growth, or making pops decay if it grows too high - this is partially good, because overpopulation is a major stability penalty). Finally, if your stability is low, it can lead to events such as unrest, riots, etc.
Compared to the previous system, the important thing to note is that stability is planet-wide. If you have a mix of happy and unhappy pops, the happy pops will suffer a production penalty as well. However, you can reduce that by having more enforcer (police) jobs on the planet.
Compared to the system at the time of the previous answer, there are no longer happiness breakpoints - that is, every increase in happiness will result in an increase in production (unless you're running up near 100%), without requiring you to hunt for specific percentages. Also, habitability is now a penalty, rather than a cap, to pop happiness. If your pop is on a 60% habitability world, it can have more than 60% happiness, but it will have to overcome a ~10% penalty to get there.