Allegiance depends on the distance to your Homeworld (HW). Your HW has an Allegiance of 100%, colonies 1 jump away 90%, 2 jumps away 80% and so on, down to 25%.
Allegiance directly influences the tax income and the resource (crystal and mineral) income of this planet. So a colony with 50% allegiance produces only 50% of the possible tax and resource incomes.
Allegiance can be raised by culture which is spread by the according buildings (Temple of Communion for Advent, Broadcast Center for TEC and Media Hub for Vasari). Thus allegiance can be raised by 10%, up to 110% for your HW, 100% for colonies 1 jump away and so on.
Advent have some specific research to increase allegiance further (I believe +35% max).
Enemy culture can drain your allegiance if it spreads to your colonies. Own capital ships can push back enemy culture in the wells where they are located. If the allegiance of a colony drops to 0 it is lost.
Anything forgotten?