Card only: Is it illegal for a business to refuse cash?

While cash is legal tender, businesses don’t have to accept cash in some circumstances.
Many people believe that because cash is “legal tender” that it is illegal for a business to refuse it.
But is that the case? In recent weeks there was a fresh round of controversy on social media over 'card-only' policies in place in some businesses.