I have no idea how no one has already suggested this, I mean it's obvious. (Oh, and I searched after "invasion"and other things and found nothing) So, you land on a planet, but somehow the population doesn't quite like you, or even wants to kill you. And on top of that you kill their leader/whatever. Basically, you make the population very, very angry, and you would trigger something that is called "siege mode". Basically it's a "the population wants to kill you and whipe out every trace of you / your building a this exact moment"-event. If this event triggers, a lot (and I mean a lot) of people would spawn and try to destroy your base and you. So you either flee or fight a huge horde of angry people with mounted sentry guns and lazer beams that come out of your mouth. That's it. Nothing more to say. Obvious thing. If there are any questions, don't hesitate to ask me.
Kinda like Terraria has blood moons or pirate invasions? Maybe have harder things on higher tier planets. Dunno if people would enjoy their houses being destroyed though but yea. ._.