There’s no difference, really. Saying both, one after the other, is just a way to stress your agreement with what is being stated.
As for language level, d’accord is a bit more formal than OK, but in a very formal context, you would use expressions like
- Vous avez raison
- Je suis d’accord avec vous
OK is a common substitute in French for “D’accord” (I agree) or “C’est bon” (Alright).
But you may also hear “D’accord, OK” or “OK, c’est bon” and even “OK, OK” to combine (or avoid choosing between) agreement and acknowledgement.