Earthworms are to fish what avocados are to humans: Nature's perfect food. Provided you can find specimens small enough for them to eat, Carinotetraodon spp. enjoy earthworms, as do puffers generally. Earthworms are extremely nutritious, thanks to the soil and partially digested plant material inside them; they're essentially 'gut loaded' with vitamins, minerals and fibre.
My only warning about earthworms is that they will contain any pesticides or insecticides used in that garden where they are collected. If you have an "organic" garden where only natural, non-toxic chemical and products are used, then you're fine. But if you're one of those gardeners who sprays every bug in sight, then any use of earthworms from your garden will carry a risk.
Cheers, Neale