I've checked into it. Since this is the first google hit when searching for unrest in gal civ, I'll write what I figured out. (all non-synthetic races). In this text, im simplifying text, for example using = when the correct sign would be <, > or =< etc). This is so more people can grasp the idea of unrest. These tests were done on DLC Retribution.
Tax is the major unrest generator. How much depends on your current population on the planet (not max, not planet class). Also, unrest increases more per percent at high taxes. An example with terran Earth, 5 pop.
[tax rate = unrest (increased unrest from 10% less than this)]
0% tax = 0 unrest.
10% tax = 0.8 unrest (+0.8 unrest)
20% tax = 1.69 unrest (+0.89 unrest)
50% tax = 4.79 unrest (+1.12 unrest)
90 % tax = 10 unrest (+1.41 unrest)
100% tax = 11.5 unrest (+1.5 unrest)
So as you can see, the first 10% tax increase unrest by 0.8 for a 5-pop planet. But the last 10 % (90 to 100%) increase unrest by almost the double!
But wait, there is more.
The ratio between population and unrest is not linear. Let me explain with a short example, setting tax = 100%.
Planet with 3 pop = 9.24 unrest
Planet with 5 pop = 11.5 unrest (planet earth from example above)
Planet with 10 pop = 19.85 unrest
Planet with 19 pop = 28.37 unrest
As you can see, a 3-pop planet has more than triple its pop in unrest (ratio unrest/pop = 9/3 = 3). But the largest planet has less than 1.5 ratio (28/19 = 1.5). At 10 pop, the ratio is almost double (10 pop, 20 unrest for 100% tax). As mentioned before, taxes scale this down non-linearly, so the 10 pop-planet with 50% tax gets 8.27 unrest instead. To clarify: if you cut your taxes in half, you also cut unrest MORE than half. It's like people dislike the first penny you take, but the f***ing hate when you steal their last penny.
As a last note, distance from home planet affects unrest but its small. I checked two planets, one next to home (distance = 1 parsec), and another at a distance of approx. 90 parsecs (both pop=4.4). At 100% tax, the difference was 1 unrest. At 50% -> 0.4 unrest. So maybe this is important on huge or larger maps when your empire is spread, but you can relocate your home planet so its more central to your planets. Just remember that the old home planet no longer enjoys its free extra morale from being the "real" home.
I hope this helps anybody who, like me, googled like a madman for how unrest works. Also, If you figure out how to calculate sums and percentages for unrest please let me know. I currently have -28 unrest on a planet, and when I try and calculate my approval I get 18. So I should have -10 morale, but I have 2.7. I guess world-wide buffs like xeno artifacts should not be mixed with planet-specific percentages or something. I hope the devs just release their damn formulas some day.