What advantage is there to staying in the air?
Generally speaking your speed on the ground will be faster than your speed in the air, and therefore you will want to get back on the ground as quickly as possible. In certain cases gliding will open up a strategic oppurtunity, such as reaching a new area, taking a shortcut, or giving a benefit applicable only to those who choose to stay in the air. For example near the end of the course Mount Wario, there is a gliding segment where several hoops can be found in the air (see figure 1), which grant a small boost of speed when flown through. In such cases your own judgement will need to be used to decide what is the best opportunity, by weighing both it's measure of benefits & risks.
Figure 1. Flying through these hoops will grant a small boost of speed.
However, if you choose your kart customizations correctly, you can gain an air speed that is equal, or nearly equal to your ground speed. If you can find a combination that provides such a kart then it would essentially be best to remain in the air, since you would not be losing any speed, and you could leave yourself open to new strategies.
I hope this helps! :)