The Highway Code says you may use your horn to give warning of your presence, so technically you can beep if someone is about to pull out in front of you, but not after they have done it. Using it as a gesture of annoyance is not recommended, but oh so common it is kind of to be expected. If you are walking down the street and someone, eyes in their phone screen, bumps into you, you would express annoyance at their lack of care, and this is the same reaction behind the wheel. Drivers are very sensitive to criticism of their driving skills, treating it like a personal attack on them, so you are probably better muttering 'idiot' or whatever helps you let off steam, rather than sounding the horn. But we are only human!?