The Zohar and Chassidus explain that “wisdom” and “nonsense” here actually refer to two types of wisdom, one which is termed “light” and the other which is called darkness.
The light derives directly from the Torah – the search from above – while the darkness is the view of reality resulting from the groping search from below, the attempt to understand the world in its own terms.
The difference between these two types of wisdom is so great that the latter is called “nonsense” relative to the former.
The point that Shlomo was making was that when the sciences are used to explain a matter in Torah – for example, when astronomy and mathematics are used to explain the laws of the new moon – this scientific knowledge ceases to be secular. It becomes part of Torah. The darkness is transformed into light, a greater light than that derived directly from the Torah. This is the “advantage” that Shlomo is talking about. The light resulting from transformed darkness has an advantage over the light derived directly from the Torah.
Excerpted from “A Day In The Life Of Melech HaMoshiach”, by Prof. Shimon Silman.