I would use «Cordiali saluti» in a letter where:
- I invite people for a some "familiar" for example a wedding;
- some commercial letter, in which I want to be "closer" to the customer, and the customer is a private;
- If i am a doctor (or a lawyer or another professionist) and reply online to the question of an user.
I would prefer «Distinti saluti» if I am in a professional context, for example if I am replying to an application letter (expecially if the letter is negative!), or sending a letter to a customer, but I represent the firm and the customer is a firm.
remember that both are interchangeable, AND nowadays, the formal context is always less and less used:
often people, also in a professional context including corporation, write mails informally (expecially after the very first contact), and this happens also in Italy.