Chemical weapons are a bit like Age of Sail line of battle, with an awful lot depending on the weather. Biologicals are even worse, since neighboring populations - surprise! - turn out to be pretty closely related, making it difficult to target foreign ethnicities. Humans in general are pretty tightly clustered, although I would imagine one of the great weapon uses for AI systems in this century (or decade) will be biologicals very tightly targeted at micropopulations, very small cell factors (so, with your new AI-designed bioagent, instead of 80% enemy 40% friendly [which was the estimate for an Anti-Black People agent in South Africa] it goes to something like 70% enemy 10% friendly). Both biologicals and chemical can have unpredictable weapon effect, which is the primary reason we don't see them more often. A really great rifle that shoots backwards even .1% of the time would still be the world's worst rifle.
Nuclear states have a form of "super-sovereignty" that effectively makes them a different kind of state. No one's chucking rockets or missiles at you anymore, no one's going to risk an airstrike or putting you on the Regime Change list. The long term effect of holding a nuclear arsenal has some nasty follow-on effects internally, for a nation, beyond just the sanctions and such, but it's such a cost-effective method of deterrence that such factors fade into the background.