Members of the cabbage family (and onions: see below) are sometimes damaged by the larvae (maggots) of a fly that looks a lot like a small house fly. The flies lay eggs at the base of the plant. The eggs hatch and then the maggots feed on the roots. Plants like broccoli and cauliflower will then wilt easily during the day, because they can't transport enough water up to the tissues with their reduced supply of roots. The plants may simply fail to thrive, and the leaves can have a shriveled appearance. If you clear the soil from the roots you may find there are not a lot of side roots, and you may see some of the maggots, which are 1/8 to 1/4 inch long, and white. The plant might be saved by drenching the roots with a rotenone or pyrethrum solution, and pulling soil up over more of the stem, which can root along the stem. Often though, it's more practical to pull the plants so you destroy the larvae, and replant.
The damage is most noticeable and distressing when the maggots get into radishes (which, after all, are enlarged roots). You can sometimes see the actual maggots when you pull the radish, or at least see the brown tunnels along the top and sides of the radish. If the soil clings in clumps to the taproot below the radish that's often a clue there are maggots, since in our sandy soil that wouldn't otherwise happen. If you're not squeamish, part of the radish can often still be eaten. But those radishes will be hotter. The radish at the top of the post has not been damaged by a root maggot - notice that the soil did not cling to the root, as well as the absence of tunnels.
The key to prevention is to keep the fly from laying eggs at the base of the plants. Pieces of cardboard, tar paper, or old carpet can have a slit cut to the center, a small circle cut for the stem, and then slipped around the stem to lie flat against the ground. I haven't ever tried that method. What I've usually done is put wood ashes around the stem, or along the row of radishes, which in theory makes an inhospitable place for the fly to lay eggs. I've had only moderate success with radishes doing this, but haven't had any problem with the maggots draining energy from my larger plants since I've done this. Haven't yet done it this year even though the plants have been in the ground for a week. This is a mistake, and I need to get to it soon. I reapply the wood ashes after every rain that washes them away. Right now it's hot and dry and so I'm watering a lot, making it impractical to keep reapplying. (I don't have root maggots yet this year. These are pictures from last year.)
Some folks in the community gardens haven't had any trouble at all with their radishes, and others of us have had. Considering these are flies you wouldn't think they'd stay in a plot, so I'm not sure what the reason is. It might be a timing issue.
Onion maggots are a different species. The fly lays one egg generally at the soil line, and when it hatches and starts to eat, the greens will start to yellow and maybe wilt. When this happens there's no point in trying to let the onion continue to grow. You will usually find the maggot at the base of the onion itself. Throw the onions or at least the maggots in the trash, not on the ground. Read more about them here. We also have onion maggots in the community gardens, but they haven't been a significant problem. Or at least, they haven't been a significant problem for anyone except JP, who typically gets his shallots in very early. One of the lessons is that the timing of planting can make a huge difference in protecting us from the emergence of some pests, or in trapping the pests in plants we can later discard, leaving our crop to grow on .
The surest and safest way to protect plants from root maggots and many other pests is to cover them with a grow fabric made of spun polyester. It does warm the plants somewhat (we don't need that) and reduces the light transmission marginally (which is fine for us). It's a nuisance to deal with, but very effective. I've never done this for root maggots, but last year I covered my cucumbers for 3 or 4 weeks to give them a head start over the striped cucumber beetle. More on that later.