Ever since Mega Evolutions debuted, people wanted to see Flygon get a mega evolution that changed its primary typing from ground to bug and honestly, I don't think it makes any sense. While Nintendo did say that they couldn't come up with a design, I say that's just an excuse. In reality, Flygon's reason for lacking the bug-type goes a lot deeper than that.
A very well-known fact is that Flygon's evolution line based on the antlion, even Trapinch resembles the larval stage, with the ability Arena Trap being a reference to how antlions capture ants by digging holes in the sand, with the Japanese name being "Arijigoku" (ありじごく), which is what the Japanese call the antlion larva. However, if you take a look at the antlion's environment, you'll find another reason for Flygon's ground-typing. My theory is that a Pokémon's primary type relates to its environment, sure there are some exceptions like Pikachu or Skrelp, but for the most part, it's pretty straightforward. Magikarp and Krabby can both live and breathe underwater because of their water typing. Now, there are two places in pokémon where ground-types can be found, caves and deserts. Trapinch was introduced in the Hoenn region, the first main-series region to have a desert and where do u find antlions? Deserts. So, now the ground typing makes a lot more sense eh? Ok, now that I explained how the ground-type makes sense, let's imagine how a bug-type Flygon would work.
1) The secondary typing transferring to the primary spot: One of the many ways people could see this work is giving bug as a secondary type to Trapinch so it would transition over to the primary slot after evolving, while it is an interesting idea, that is not how evolution works with dual-typed pokémon. When pokémon with two types evolve, one of the types need to be replaced, it doesn't matter if the type is primary or secondary. For example, when Fletchling evolves into Fletchinder, its normal-type was replaced by fire. If u want a bug-type example look no further than Skorupi, who swaps out bug for dark. Anyways, if Trapinch did get the bug-type as secondary, it would still be replaced by dragon after evolving into Vibrava.
2) The primary typing getting replaced in a mega evolution: Now we get to the scenario most people hoped for after the release of X and Y, Flygon replacing its ground-type with bug after going mega. This idea also sounds interesting, but much like the first option I don't see it happening either. To me, most of the type changes that happen after mega evolution seem to be based on stats. Like Agroon swapping out its secondary typing of rock with more defense.
3) The whole evolution line having a regional variant based on a dragonfly: Finally we get to the idea which Gamefreak will most likely pick, and the one that'll probably be true. Even though Sun & Moon introduced Alolan forms, regional variants have existed way before that. So this idea doesn't sound as farfetched as the other two, but there's a problem. Not all insects have the same life cycle, in fact they can be divided into three categories: aquatic, semi-aquatic and terrestrial. Terrestrial ones like the butterfly are born from their eggs as larvæ, then become pupæ and finally grow up to an adult stage called "imago". This process is called holometabolism, more commonly known as complete metamorphosis, and it serves as the life cycle for most land insects. Caterpie is a great example to represent this since it's a caterpillar that evolves into Metapod, an immovable chrysalis, which then evolves into a fully grown Butterfree. For the aquatic and semi-aquatic ones, both start their life cycle underwater, with the only difference being that the latter must reach land before becoming imagines. They do share something in common though, that being the lack of a pupal stage. This causes the insect to experience hemimetabolism, or incomplete metamorphosis. Dragonflies belong to the semi-aquatic category, and I'll tell you how this process works. After the female lays eggs, they will hatch into naiades or nymphæ which live beneath the water's surface. As they grow up, they shed their skin a certain amount of times depending on the species. Once they decide when it's time to mature, they'll stop looking for food, exit the water and head to the nearest plant. If they find the nearest plant, they'll start climbing into it. After that, they will hang onto the plant upside down and finally the nymph's skin is shed for one last time with the adult dragonfly crawling out of it. Dragonflies are usually found in forests just like most bug-types. So the bug variants of Flygon would also be found in this environment. However, Trapinch would be near rivers due to the partial water typing.
So you now know that a bug-type Flygon could exist. However, that means we have to wait until the Hoenn pokémon are confirmed to get regional variants. In the meantime, go catch a Yanma. It may not have the dragon type, but it's still a dragonfly.