We divide the potential attackers into broad categories.
If a democratic nation-state with a navy -- even one with a small navy, such as Canada or the Netherlands -- decides to attack the seastead, there is no practical defense. An attack on the seastead by such a nation would likely be ignored by other nations. An attack by the seastead on a warship would be treated as an act of war.
A practical defense against democratic nation-states is good public relations. It is absolutely essential that the seastead get publicity as a peaceful entity before any serious disagreements arise with other states. If the seastead is successfully portrayed as a nest of heavily-armed lunatics, nobody will care what happens to it. Consider what happened to the Wikipedia:Branch Davidians.
Nation-States where public opinion may not be an adequate defense
Russia, China, Ukraine, and France (Wikipedia:Rainbow_Warrior_(1978))
Fortunately, no rogue nation-states currently have an oceangoing navy, so their ability to threaten a seastead is minimal.
Pirates might attempt to rob or kidnap the inhabitants, steal goods from the platform or from supply ships.
It's not safe to assume that all seasteads will be mutually friendly. One seastead may try to take over another. A group of seasteads might surround or partially surround another seastead in order to force it to move from its current location.