I guess you're just starting out. On my first run through of the game it was pretty difficult for me too. Whe he gets underground keep a careful eye on the radar while charging your power beam, when you see one get close to you try and lock onto it as soon as you can. If you lock onto it while it's still underground or just bursting out you can hit it with a charged shot and follow it with as many unpowered shots as you can before it goes back underground. If you miss the chance to hit it with a charged shot then just shoot normal shots while you can. It can get confusing when there are many of the wrms digging around, but stay focused on the radar and on what you can target.
When it attaches itself to the sphere take off the helmet with the best weapons you have. The light beam charged up works real well, but you may want to save them for the last stage. The key is just to blast one helmet at a time and do it quick. When one of the heads drops down and starts sucking in the area around it, change into morph ball mode let yourself be sucked in and blast him with morph ball bombs.
Stay in the same safe zone as long as you can.