I have seen badgers sniffing around my hives, but they have not gone further but the hives are fairly high off of the ground. Last year the badgers dug out two wasp nests in my rough ground (thanks) and a bumble nest from the edge of my lawn (boo), so they must be sting resistant. Wasp nests do stink during their carnivorous phase at this time of the year. Maybe this is more attractive than honey to brock? BUT the classic way to attract badgers is said to be honey/golden syrup over peanuts.
If they are keen to get at your hive, I suggest a brick or block wall or sheep wire fence. They thump & chew through panel and feather-edged wood fences around here.
I have had between 4 and 6 hives on top of a badger sett for a year and no problems. Nearest entrance is about 3 ft from the hives. The hives are on top of a base of 2 railway sleepers. You can see their trails going round the hives and we have had no problems so far. However during the winter we did strap the hives to the sleepers in case they got too inquisitive.
There is a HUGE badger set within half a mile. The badgers visit occasionally.. but do no damage. The foxes which are in the next door field, are,however, more of a pia. They appear to be digging holes under one hive - probably looking for worms. They use a softer part of the veg patch as a toilet...the smell on a hot day. (none of those recently alas)
over the last two years i have lost about 7 hives to the badger and they dont just knock them over but totally annihilate them, mainly nuc and weaker hives so i dont mind the loss of the bees too much but frames are non existant and the boxes and floorboards are chewed up pretty bad. believe me once they get a taste look out
I would imagine apiary hygiene is an important factor here. If you keep the area around your hives clean then the badgers should show no interest. If you litter it with bits of brace comb, sugar syrup, honey etc then it's like ringing the dinner bell.
Do not offer badgers morsels - take home scraps of comb. And badgers are sometimes inclined to use a beehive as a scratching post, perhaps try and secure them when hives are light and badgers are hungry when the ground is dry.
Like others, we have badgers passing through between our hives and as yet have had no problems. The badgers seem to be creatures of habit and you can usually see where their usual trails are because of holes in hedges, less growth underfoot and other clues so I imagine when siting hives you need to avoid the trails. If the hives are there first I suspect that stands, especially if on top of paving slabs, will deter them establishing routes too close to hives.
If you'd like to see badgers in your garden put out some monkey nuts. They love them and don't take them back to the set just sit there and strip and eat them. We have had a family of 5 on film in the back garden in the past. Wonderful to see and enjoy.