Birds that spend most of their time in trees tend to hop because this is faster and easier on narrow twigs and branches than walking like a tightrope acrobat.
These birds have evolved legs and feet that hop efficiently, so it makes sense to keep this up even when they are foraging on the ground.
Hopping works best for small, lightweight birds with short legs. Each hop takes them as far as several steps if they were walking normally, so they use less energy. But even though it beats walking, hopping is slower than running.
Blackbirds, for example, will switch from hopping to running if they are in a hurry.