First life forms to evolve controlled flight
It was probably an early Pterygota (winged insect).

To my knowledge, the phylogeny of Pterygota is not completely resolved.


Hennig (1981) describes the following phylogeny





Boudreaux (1987) describes the following phylogeny





Wheeler et al. (2001) offers good evidence for this phylogeny




Odonata encompasses dragonflies and damselflies. Ephemeroptera are commonly called mayflies. The origin of pterygotes was about 300 million years ago.

The very first flying(ish) insect had three pairs of wings (Kukalova-Peck, 2005). The pair present on the first segment of the thorax (counting from the head) was then lost in all extant species. Note however than membracidae are using the developmental pathway for this third pair to make elaborate display (mainly for defence; see below).



Some clades further lost both pairs of wings and one clade, the Diptera (flies) lost only the last pair of wings. This last pair is replaced by halteres that are particularly visible in crane flies (see below)