That’s certainly the view in Britain where one webpage begins:

Hedgehogs are gardener’s friends
Hedgehogs have been having a hard time in recent years, and the British population is thought to have fallen from around 35 million 60 years ago to a mere 1.5 million today. This is bad news, as they are the gardener’s friends since they consume many pests including centipedes and slugs.

In NZ however, conservationists are not keen about them — on the DoC website, this page starts:

Hedgehogs were first brought to New Zealand by acclimatisation societies to remind settlers of their homeland, but were later introduced in greater numbers to control garden pests such as slugs, snails and grass grubs.

Today, hedgehogs are abundant throughout New Zealand, and pose a significant threat to many of our native species.

In many areas of New Zealand, there are now estimated to be between 2 and 4 hedgehogs per hectare (and in some areas as many as 8!)

You can take the view that DoC itself plays a major role in killing native weta, skinks, the eggs and chicks of ground-nesting birds, and insects that birds feed on by spreading poisons, not only 1080, but Brodifacoum which is spread in public bush areas in Waikanae by the GWRC.

A few years ago Pindone was spread in the Parkwood property renting business neighbour of ours, perhaps to kill rabbits (we’ve never noticed any there), but it certainly had the effect of wiping out Pukekos and the hedgehogs.  Having cute, dying animals show up in our garden from that estate was very distressing.

In the urban environment hedgehogs’ benefit to the gardener outweighs DoC’s concerns. According to this stuff article: “they are great pest controllers, but if you want to feed them, here is a tip: feed them wet cat or dog food! Not bread and milk! A lot of mammals become intolerant to milk as adults and can develop diarrhoea. This applies to cats and dogs as well [however, you can get lactose-free pet milk].”