The Merrium-Webster dictionary defines beneficial insects as "organisms…that feed on or parasitize pests of crops, gardens, and turf.” Wikipedia points out that the "concept of beneficial is subjective and only arises in light of desired outcomes from a human perspective. In agriculture, where the goal is to raise selected crops, insects that hinder the production process are classified as pests, while insects that assist production are considered beneficial.”
There are many definitions of pest, but horticulturists generally agree with Wikipedia's definition: "any organism harmful to humans or human concerns.” This includes bacteria, viruses, weeds, and anything else that interfers with plant growth.
Destroy other injurious insects by living on or in their bodies and their eggs. (parasitic insects)
Capture and devour other insects. (predators)
Aid in…pollinating the blossoms.
Destroy various weeds the same ways they destroy crops.
Improve the physical condition of the soil and promote its fertility by burrowing throughout the surface layer.
Serve as fertilizer (Dead bodies and droppings)
Serve as nature’s garbage handlers by devouring the bodies of dead animals and plants and by burying carcasses and dung. (Scavengers)
Source: Vegetable Resources, Chapter VI. Insect Management.
Lady beetles are beneficial because they are predators of aphids, mealy bugs, spider mites, larvae of the elm leaf beetle and many other soft-bodied insects, but not grubs, caterpillars, other beetles. They can be considered pests because they are non-preferential predators that also consumes moth and beetle eggs, including those of insects we consider beneficial.
Likewise, fire ants are pest because they cause painful stings, often in large numbers, out-compete native species, and damage the ecosystem in other ways. But they also consume of large numbers of fleas, ticks, termites, cockroaches, chinch bugs, mosquito eggs and larvae, scorpions, other pests, as well as digging extensive nests that aerates the soil and helps improve drainage.