Even if you can design it in such a way that an external attack is very unlikely to cause a meltdown, it's a juicy and easy target for an adversary to cripple your electricity production. A few dozen well placed missiles might be all you need to take an entire nation that's heavily nuclear dependent to its knees.
On the other hand, solar and wind are hugely decentralized and distributed, making an attack that destroys these generators drastically more expensive. An adversary might still be able to take out the grid by targeting transmission infrastructure, but recovering from it should be relatively quick because the actual generators are all still intact.
But perhaps this flaw is alleviated by smaller scale reactors that produce a much smaller percentage of a region's electricity.