Whether your refusal to work from home is a lawful reason for ending your employment will depend on all the circumstances. It is most likely to be fair if, for example:
your employer has a good business case for asking staff to work from home – for example, long-term structural changes brought about by the coronavirus pandemic;
your employer has considered all the alternatives and discussed these with you;
your employer has engaged in a fair procedure, including by giving you as much warning as possible of the planned changes, consulting with you, listening and trying to take into account your concerns; and
your employer has taken steps to address all the practical concerns that go with working from home.
Your employer must not discriminate against you. And if you are disabled, your employer owes you a legal duty to make reasonable adjustments to help you work from home.
Speak to your trade union if you are concerned.