If they have an aversion to a certain social setting, and you choose it, they will be your enemies.
Some factions are just automatically hostile towards others, without any reason.
If you have the setting at the beginning to make factions more aggressive, than they will be.
If you have a treaty or a pact with someone they are at war with.
Some factions are aggressive, and will attack you without reason, or demand something from you, if they see you as weaker than them militarily wise. Check their faction profiles next to Aggressive and it'll tell you if they are Pacifist, Erratic, or Aggressive.
Committing atrocities, such as using poison gas on enemy human bases, upsets other factions unless the Planetary Council has repealed the UN charter against atrocities. They will sometimes attack you for that reason alone.
If you are caught using probe teams against them.
If someone, even an AI controlled faction, uses probe teams against them and successfully makes it look like you did it, then they'll declare vendetta against you.
If you are the strongest faction, they are more hostile towards you.
If you are significantly weaker than them, certain factions will be more likely to attack you, or bully you for technology.
Your Integrity rating will determine if they are more likely to be hostile towards you.
If by votes in the Planetary Council you become Supreme Ruler, some may object to that and declare war against you.