@5UB
I thought quite carefully before deciding to comment on this, because there is some quite bad advice in this thread, and you might not like what I have to say. Some of the internet lawyer wanna-be's almost certainly won't. Some of that bad advice might be from the police. Be aware, rarely are police experts in landlord/tenant law and, usually with the best of intentions, can get it very wrong. I could cite a few precedents where it has taken a judge in a court case levying penalties against the police to convince them of that.
The problem is, what you can legally do does depend on circumstances and that, of course, varies hugely.
The first piece of legally bad advice you've had is that "legally" nobody can enter without your permission, or in your absence. Yes, they can. The landlord, or his agents, can under s11.6 of the LTA1985, for "inspection" purposes provided they do it at a reasonable time, and having given at least 24 hours notice, in writing. That is an example, by the way, not the only situation. Other repairs, maintenance etc are also cover by s.11.
One area of complication that often confuses is that while, in most circumstances, landlords or their agents can't force entry, against your wishes, if you are present, you do not have the right to deny the statutory s.11 access if you are not present.
The landlord is also under a statutory duty to perform certain checks, like a gas check, at periodic intervals.
On the other hand, landlords do not have a right to enter just whenever they feel like it. You do have a right to quiet enjoyment, and a landlord could find themselves acting criminally if a pattern of unauthorised access reaches "harassment" levels.
The landlord, therefore, has some rights of access but it's very limited. You have a considerable degree of rights to keep them out, but it's not absolute.
Less black and white is the lock-changing. Because the landlord has certain legal rights to enter, changing locks without permission potentially opens a can of worms. You might well, for example, end up giving the landlord/agent a key to allow them entry when exercising their rights, and if you change locks without agreement, you are likely to have difficulty getting reimbursed, and worse, run a distinct risk of a landlord having them changed back if you don't provide keys, and billing you for it.
Furthermore, by changing the locks, you run a distinct risk of breaching your tenancy, and an argument in law exists that doing so is criminal damage. Whether a landlord goes that far is another matter, and the vast majority wouldn't, but you risk eviction action, and criminal damage issues. Remember I said it's not black and white, but circumstance-dependent? This is an example. That action could revolve around what's reasonable for you to do, in the circumstances.
Bear in mind, criminal damage does not require visible, physical damage. By interfering with the operation of devices that are part of the fabric of the house, i.e. the locks, it at least could be argued that you have committed the offence. And the fact that many in this thread have so changed locks won't help you at all if your landlord takes action. While your circumstances might form a defence, their anecdotes will not.
At an absolute minimum, I'd advise checking your lease agreement. It's far from uncommon these days for them to contain an explicit clause preventing locks from being changed, and if so, it may suggest how the landlord may view it if you do, and (circumstance-dependent) would certainly put you in breach of contract.
I'm not saying don't change the locks. I don't have an opinion on whether you should or not. I am saying that if you do, do so eyes wide open, understanding the potential issues it may create.
I'm also not saying these legal issues will arise. Odds are, if your landlord is half reasonable they won't. But if he/she isn't .....?
Finally, it's common for people to feel the law says what they think it ought to. Sadly, it often doesn't, and that's why advice on legal matters from the internet, including mine, is usually a bad idea, and is why I thought carefully, very nearly didn't post this.