Ignore them and attack something else. A planet camper is a 'Maginot line'.
As long as they're using that technique, they are completely ineffective to the game as a whole.
Sometimes you have to think about the tactical level and then look how it affacts the strategic view. If the player's camping a large friendly planet... Well, you can't attack that large friendly planet, but there are a dozen others that you CAN attack that they have absolutely no capability to defend.
It's the old impregnable defense theory, and it's something you can read in The Art of War. If you create a defense so perfect that none may get in... you can't get OUT.
Quite true, and a very good point. I didn't think of it that way.
OTOH, in some cases planet camping can still be an effective strategy. In the Sirius system for instance, if a Drengin Starbase camps Sirius AIII, they can safeguard the main - and huge - Drengin population factory of Sirius AIII, Sirius AIIIa, Sirius AIIIb, and Sirius AIIIc. With this population factory safe, the Drengins are a force to be reckoned in the system. Have you ever seen literal swarms of colonizers flooding the rest of the system with 1-billion-population colonies from the Sirius AIII population factory? Trying to conquer and maintain control over other parts around the Drengin sphere of influence without taking the Sirius AIII factory is rather difficult...