Honestly, yes—most of the time. A lid is a simple but effective first line of defense. It keeps rain from pouring straight into the bin, so the waste stays drier, smells less, and produces less nasty leachate. That alone makes street cleaning and collection easier, especially in cities where bins sit out in the open for hours.
For pests, a lid helps too, but it is not magic. A well-fitted lid with a decent latch makes it harder for flies, rats, and birds to get to food waste. Still, pests are persistent. If the bin is overflowing, the lid is warped, or people leave bags beside the bin, you will still have problems. Regular emptying and cleaning matter just as much as the lid itself.
Open bins are usually worse in wet weather because they collect rainwater and create a damp, smelly environment that attracts flies and mosquitoes. Lidded bins also look tidier and reduce windblown litter, which is a real plus in dense urban areas.
So the short answer is: lidded urban trash bins are better for keeping out rain and pests, but only when they are well designed and properly maintained. A tight seal, good drainage, and frequent collection are what make the lid actually work.