The earliest insects evolved on land some 500 MYA, as plants began to proliferate, and habitats stabilized.
Terrestrial hexapods descended from aquatic crustacean ancestors. Insects and crustaceans are distant cousins: both belong to the clade pancrustacea. (A clade is a biological group (taxa) which includes all descendants of a common ancestor.) The compound eyes of insects originated in water.
Insect success owed to serosa: the membrane that waterproofs insect embryos inside their eggs. This innovation greatly increased tolerance to a diversity of environmental conditions.
Emergent insects were at first flightless consumers of decayed plant matter. In evolutionary terms, plants succored the rise of insects.
Insects rapidly diversified, gaining exquisite individualization of functions from biomechanical enhancements: legs, antennae, and mouth parts, as well as other appendages. Wings sprouted during the Devonian.
Once winged insects originated, they diversified very, very quickly: so quickly that their diversification appears, from a geological perspective, to have been instantaneous. ~ American paleontologist Jonathan Payne
Arthropods evolved in codependence with the increasingly diversified vegetation. Interdependency between insects and plants developed during the Late Devonian.
As plants gained height ~400 MYA, insects developed wings to carry them aloft. This advance insured the prosperity of the little 6-leggers. Then they became not so little. Abundant oxygen, the success signature of the proliferating plant world, afforded 4-wing dragonflies with a 60-cm wingspan. The exoskeleton-based architecture of insects is eminently scalable in size: just add oxygen.
Chilling climatic oscillations during the last half of the Carboniferous Period provoked the innovation of metamorphosis: an adaptive practice of patience. This afforded variability in life cycle, to optimize environmental exposure.
Oxygen at 1/3rd of the atmospheric mix was not to last. Volcanic activity at end of the Permian, 250 MYA, abruptly halved atmospheric oxygen to 15%. Insects shrank in response.
Insects are by far the large living group of arthropods: the most prosperous animal throughout history. Their success owes to inherent adaptability, notably simple and pliable biomechanics, and their close relationship with plants, a reliable food source and homestead.