One theory is that they get their name from a corruption of the phrase "ear wing," supposedly referring to the ear-like shape of the insect's hind set of wings.
The 'wig' part was related in Old English to the verb we now know as 'wiggle'. This, as Andy's answer says, refers to the motion whereby the creature supposedly got into one's ear and has nothing at all to do with false hairpieces. So, basically, it's a wriggler that gets into ears.