Earthworms are a very important part of a healthy soil environment. They can help break up light compaction and create paths for air and water to move through the soil. They also help break down organic matter and release nutrients that are then available for plants.
Earthworms tend to come up to the surface and produce castings/bumps when the soil moisture level is too wet, usually from a recent rainfall or because of over-irrigation.
Earthworms themselves should not be eliminated from lawns but recognized for the benefits they provide, which are evident in a healthy landscape. If the bumps they cause are troublesome, try reducing the irrigation applied to your lawns. You can also try rolling the affected areas with a weighted roller, such as that often used for smoothing out newly laid sod.
Note on Irrigation:
When irrigating, remember it is better to water deeply, less often. Depending on your conditions, grass species and sun exposure watering lawns two to three times a week should be sufficient. Soils high in clay content have less pore spaces for plant respiration, hold water for longer periods and require irrigation less often. The opposite is true for sandy soils. How long to irrigate lawns depends on your irrigation system, soil, etc. but you should run it long enough to moisten the top 6” to 8” of soil.