Why is 'the' used before air in the expression in the air? Air is an uncountable noun. However, 'the' (the article) precedes the word 'air'. For example: He hit a ball in the air. How can air be specific?
The definite article can be used with both count and mass nouns. With the latter you are referring to some specific portion of it. If I were to say The water is cold, I have a particular portion of water in mind— perhaps the water in my laboratory beaker, or perhaps the water of the lake I am wading in. If I were to say Water is cold, I would mean that all water everywhere is cold, and one would immediately object that water can be warmed up, and that some water is quite hot.
Naturally, you will see the in conjunction with words for "big" concepts, whether physically large like geographic or planetary features, or conceptually sweeping: the sea, the economy, the bush, and so forth. The air in in the air is also a more metaphorical usage:
air 1.2. the free or unconfined space above the surface of the earth: he celebrated by tossing his hat high in the air [ODO]
Thus, to hit something in the air or into the air is to hit it away from the earth. If I hit a line drive, in which the ball is projected close to the ground, it certainly traveling in air in the sense of being surrounded by the mixture of gases which envelopes our planet, but not in the air, which would mean towards the sky.
In this expression, the “air” in “in the air” can be thought of as “sky”. This is sense 2.a. from thefreedictionary.com:
2.a. The sky
Source: Definition of “air” on thefreedictionary.com
Of course, the sky is usually thought of as very high up, whereas the air is anything off the ground.
So “in the air” generally means “currently somewhere above the ground”.
“The ground” presents the same situation, grammatically speaking. We're not referring to a specific ground, or a specific section of ground, we're referring to the ground in the most general sense, i.e., “the (outdoor) floor”.
You’ll notice that “currently somewhere above the ground” is not what you meant to indicate about the ball. There’s a reason for that, which is not the subject of your question, but is worth mentioning: When describing a movement, such as the movement of the ball from the bat to the air, it’s better to use “into” as in “He hit a ball into the air”.
As it is currently written, the sentence just tells us that the ball was in the air at the time when he hit it, not necessarily that it went up after he did so.
If I say "I breathe air" then I am speaking of some non-specific body of air. If I say "I hit the ball in the air" I am speaking of all the air in the world, which is a specific body of air. That's why we use "the" in this context. An analogy is "I love water" vs. "I love the water." The first suggests that I love to drink water. The second suggests that I love to be by or on or in the ocean, or lakes, or rivers, or some other body of water.