This will depend on what’s written in the tenancy agreement. Some contracts will have a clause that specifies tenants should allow viewings if necessary.
If the tenancy agreement doesn’t say anything about letting viewings take place, tenants have no obligation to agree.
In practice, even if your contract has a viewings clause, it can be difficult to enforce. If you do want to sell your rental with a sitting tenant, it’s sensible to arrange viewings with as much notice as possible while being considerate of tenants’ work patterns and other activities. Needless to say, you should not enter the property without their consent, and you need to consider your right of entry.