Short answer - you'll need to ask the property to be sure.
All the mains tap water will be fine to drink everywhere in the UK and Ireland.
However...
Some hostels may have a tank which feeds some of their taps, so you may find that the taps in the kitchen are mains-fed and fine, but the ones in bathrooms (for an example) could be fed via the tank, and may not be as fresh.
The hostel will be able to tell you which ones are fine.
Additionally, there are some hostels that aren't on the mains water (eg remote ones in Scotland), so there may not be any drinking water there, other than what you hike in yourself.
In pubs - it's always fine to ask for a glass of tap water, and they'll give you one (it's in their license).
However, bottled water may taste nicer, so people not drinking eg beer may well often prefer bottled.
travel.stackexchange.com/users/26/Gagravarr
When I moved to London for a few years, almost all my friends had filters.
The trace calcium / limescale in the water will result in some people telling you it's "hard" water, or "soft water" depending on where in the UK you are.
Indeed, there's debate over where it tastes better or worse: Is there really a north-south water taste divide?
Many friends had these filters to try and remove the limescale, and you had to regularly clean your kettle to remove the build up of this stuff.
However, is it drinkable?
Sure.
No problems at all.
Most who buy the bottled water did so purely for convenience, or taste.
travel.stackexchange.com/users/101/Mark Mayo
Tap water in the UK and Ireland is drinkable.
There are a tiny number of cases where it is not, but the place you are staying at should post notices on any indoor tap where the water is not drinkable.
travel.stackexchange.com/users/264/DJClayworth
Premises that serve alcohol are obliged by law to provide free tap water to guests so I wouldn't be shy to ask for it.
Nowadays they don't even look surprised when you order mains water!
BTW here is a list of some FAQs regarding British tap water (including your question).
It's not hyperlinked unfortunately but I used the ctlr+F function to look up this answer http://www.water.org.uk/consumers/water-and-health/faqs
travel.stackexchange.com/users/38715/Zuzana 
The water from taps in Great Britain does vary in hardness depending on where you are as the map above shows.
Anywhere where food is involved the water will be mains supplied and quite safe to drink.
Mains water is carefully and continuously monitored by the Water Authorities.
This does not apply to water in washrooms/toilets etc.
Often this water is supplied from a storage tank in the attic of the property and is not potable (drinking).
This practice is rarer in modern properties but is quite common in older buildings, small hotels, lodgings etc.
travel.stackexchange.com/users/35026/Paul
I would like to ask if the tap water in hostels of Ireland and England is drinkable.I never saw someone drink from there, and even in the pubs you have to order for a bottle.
Is tap water in Ireland and England drinkable?
travel.stackexchange.com
<uk><ireland><tap-water>
travel.stackexchange.com/questions/18836
travel.stackexchange.com/users/7453/Katia Marotheodoraki
All mains tap water will be fine to drink everywhere in the UK and Ireland, but some remote hostels are not on the mains water  and you should ask the property to be sure. Pubs and establishments serving alcohol are required to provide free tap water to guests. Mains water in the UK and Ireland is safe to drink and properties not connected to the mains should put up signs indicating that you should not drink the water. Pubs, moreover, are connected to mains water and they are legally obliged to give you a glass of tap water if you ask for it.
All mains water in the UK and Ireland is safe to drink. Some properties may not be connected to the mains but if water is not drinkable, there should be a notice. Pub are obliged by law to give you a glass of tap water if you ask for it.