A very dense atmosphere
The Earth's atmosphere will burn up small meteors. A denser one will burn up even larger ones. The faster they hit atmo, the more they will burn up, so an attacker would have to drop either a very large rock (making their attacks less feasible) or do it slower than they'd like (giving more time to do something about).
At a high enough density, any manufactured weapons will simply be crushed.
This will also decrease the terminal velocity of the object reducing it's impact energy. Since impact energy is the square of the velocity, this can be a big change.
A very dense atmosphere also makes floating easier. Instead of living on the surface, live in floating cities! Then it doesn't matter how many bombs they drop on the surface.
A very turbulent atmosphere
This increases the complexity of flying small craft, such as missiles, in atmo; they'll get blown around.
A very opaque atmosphere
The water and carbon dioxide in the Earth's atmosphere absorb many wavelengths, throw more gasses and dust into the mix and you'll absorb even more. This makes observation difficult and will reduce the power of energy weapons.
A very strong magnetic field and a radiation belt
The Earth has a belt of energetic charged particles about 1,000 km to 60,000 km above the surface called the Van Allen belt. It's caused by Earth's strong magnetic field trapping things like cosmic rays and the solar wind. The Van Allen belt is strong enough to mess with sensors and damage unshielded electronics. Our hypothetical planet would have a much stronger belt able to fry even shielded electronics.
While the belt has huge gaps at the poles, so it would only restrict an attacker's plausible approaches, or require them to add excessive weight for shielding. Sort of like an orbital minefield. And because it's a belt around the equator, any orbiting object will have to pass through it, or orbit at a height to avoid it.
Receive a lot of solar radiation
The dense, opaque atmosphere will protect or colonists, but the poor saps attacking from orbit will be receiving the full solar bombardment. Not just heat, but radiation as well. They will either have to deploy bulky and vulnerable sun shields, or always remain in shadow on the night side.
Orbit a very active star
A coronal mass ejection aimed at our planet is bad news for the attacking fleet in orbit. They'll either have to high tail it out of there, or hide in the planet's shadow. Meanwhile, the colonists are protected by the atmosphere and magnetic field.
In conclusion... visit beautiful Venus! (BYO magnetic field)
With it's ultra dense and opaque atmosphere full of corrosive gasses, Venus is extraordinarily hostile to everything. What about our poor colonists? They'll be safe in their floating cities above the more toxic gases and crushing depths. Bomb the surface all you want, it's hot enough to melt lead down there with enough pressure to crush a nuclear submarine!
Venus has a very weak magnetic field, so our colonists would have to find a Venus-like planet with a strong magnetic field.