What happens if you point your finger at the sky?
In ancient times, it was believed that the sky was a solid dome stretched over Earth's surface, across which the sun, moon and gods moved. People believed that the sky could literally be touched. Therefore, a random gesture toward the sky was associated with a desire to connect with something unattainable.
In Vladimir Dahl's explanatory dictionary, this expression is defined as: “попасть пальцем в небо в самую середку” (“popast paltsem v nebo v samuyu seredku” or "to point your finger at the sky, right in the middle."). It means that a person has said something inappropriate or has demonstrated their lack of insight.
In Russian literature, this expression is often used to emphasize that a character had said something at random and was wrong. But, sometimes, this phrase is used ironically, when a random answer suddenly turns out to be correct. A character in one of Mikhail Saltykov-Shchedrin's essays, ‘The Little Things in Life’, tells his companions: "So, let's not soar in the empyrean, for we risk sticking our finger at the sky; but let's not stoop too low, for we risk ending up in a puddle."