My understanding is that the AI reacts to your power rating and to your overall score. I'm not sure how the power rating is calculated but nuclear weapons are surely included, so having a lot probably will make the AI less likely to attack you. However, ICBMs are rather expensive hammerwise, so...