Should I be friends with my neighbours?
I noticed neighbouring factions can be friendly or hostile.
When they're friendly, they'll pass by, visit or send trade caravans. When they're hostile, they'll send raids and refuse trades.
Which leads to the question:
When I am friends with a faction, do I get "friendly visits" instead of "hostile visits" from the faction? In other words, does the storyteller decide "Ok, next story: faction X" and depending on the state, the faction attacks or visits?
Or, au contraire, does the storyteller decide "Ok, next story: a raid" and then chooses a mech-raid/space-raid/faction-raid/...
Because in the first case, it's a good thing to be friends: you get a friendly visit instead of an attack. In the second case, maybe I'd rather be enemies with the faction: I seriously prefer a faction attack over a mech attack.
Are there other benefits/drawbacks to being friends/hostile with your neighbours?
Based on my time playing it seems to be a mix of the two options you described. The story teller seems to go through each of the factions based on what needs to happen next. For example, if there is going to be a raid, it chooses factions based on who attacked last. So if faction A attacked last week then they will likely not (in my experience) attack until it is their turn in the rotation. In between attacks it goes through who will trade/visit etc. Then it's faction B or Cs turn to attack based on what the story teller decided should happen.
The above description is my own experience and it may vary from person to person, but something that applies to everyone should be the following factors:
Who's got the best goods?
Who's got the best guns?
Can you take either?
To explain a bit more. If one of your neighbouring factions is more advanced or on the same level, do you want to trade for their goods or would you be happy to risk some of your own guys lives for a sweet new rifle or maybe some armour? Could you afford to buy it instead?
If your neighbour is hostile and has the potential to wipe out your colony, who would you rather have by your side? the guys with bows and arrows or grenades and rifles? You can call on allies to help fight invaders or just use them as meat shields for the incoming barrage of bullets and bombs, also remember, all loot on the battlefield belongs to you. If you play your cards right you could get two high-level factions to fight on the battlefield and take all of the spoils.
It's all in the context of your colony and what you choose could either benefit you greatly or potentially ruin your colony. So the ultimate questions are, what's your biggest gain and biggest loss from the outcome of the next attack, what goods do you need the most/have a lack of and what goods could you sell to them?