Although many countries have nuclear weapons, there has not been a nuclear war. The doctrine of mutually assured destruction has kept the world safe since the end of the Second World War. Fear of instigating another world war has deterred every nation from using our increasingly sophisticated nuclear weapons. In this way, we have kept the world safe.
Yes, arms races have kept the peace, because a nation is less likely to attack another if they think the other nation can hurt them back. The arms race kept war from breaking out between the United States and the Soviet Union. Achieving piece by knowing that all countries are strong is a dependable way to keep peace throughout the world, because no one wants the devastating consequences.