I would like to point out that in all the games I've played the pirates attack the planet closest to there base, so you can kinda figure out where they are going to be before they get there.
Another note, the size of the pirate raid depends on 1. The amount of bounty on your head and 2. The amount of ships/structures that have been built and exist at the time.
When I play single player games I ALWAYS make sure the AI has the higher bounty so the pirates will keep attacking them. This makes the AI have to spend time and resources fighting off the pirate raids that are continuously getting bigger and bigger. Just dont pour money into increasing the AI's bounty all at once.
1. When it is time for the pirate raid (so when the count down is zero and the bar is flashing red) up the bounty to just the amount to get the AI wanted and then watch it. The AI will probably bet just enough for you to be the one that is targeted.
2. Now immediatly repeat step one and keep repeating the process until the raid is launched. You bet, Ai bets, You bet, Ai bets. thats my method.
It has always worked for me, when the raid is launched the Ai has always had the higher bounty on its head. Just be aware of when the time comes to start uping bounty, it should give a voice warning saying pirate raid is imminent but sometimes the warning isn't given, just pay attention to the Skull/Crossbones tab and if it is flashing you know that it is time to bet.
This game can be kind of frusterating when you are new to it. It took me several tries to finally figure out how to win. Dont ever get discouraged, if you have any more questions post them on the forums or PM someone. You can always PM me, I will try to have an answer to any question about the game. Or I can direct you to people who probably know. Good Luck!