When you look at the Pirate window under the character icon, the image/face used to show the pirates, there is a Severity Rating bar. It may be called Threat Level or something else. Anyways it has approximately 5-6 sections to the bar. It goes something like Guarded -> Low -> Medium -> High -> Severe -> Extreme.
Don't quote me on the exact wording of the levels but that's how it works out.
Edit: And yes, the pirate threat rating increases with each pirate raid. So basically it's something that increases as the game goes on. It's to prevent people from stock piling gold early on and then hitting a player/computer with an extreme pirate raid before anyone is even able to defend against it. Even a fully upgraded starbase would have problems against the biggest pirate attack.