Did insects and arachnids diverge before or after moving to land?
Those are two very separate questions. Arachnids include terrestrial groups such as spiders, scorpions, and other arthropods. Arachnids are members of Chelicerata, which includes horseshoe crabs, Sea scorpions (extinct), and probably Trilobites (extinct). Chelicerates evolved in the marine environment, and invaded land afterwards. Arachnids and Insects evolved on land. Hexapods are nested within Crustacea, in a group called Pancrustacea. The likely sister taxon of Hexapoda (Insects, including Protura, Collembola and Diplura) are Remipedia, which are aquatic. See Misof et al. 2014 for the most complete molecular phylogeny, with dates. http://science.sciencemag.org/content/346/6210/763