Masechet Sofrim cites a Berayta which states that one should not recite Birkat Halebana until "She’yitbasem." Rabbenu Yona (Spain, 1210-1263; listen to audio recording for precise citation) cites those who explain this difficult term as a reference to Mosa’eh Shabbat, when we smell Besamim (spices). According to this interpretation, the Berayta teaches that one should recite Birkat Halebana only on Mosa’eh Shabbat. However, Rabbenu Yona disputes this reading, because there seems to be no reason to require Birkat Halebana specifically on Mosa’eh Shabbat.
Rabbenu Yona therefore mentions a different explanation, claiming that "Yitbasem" relates to the Talmudic phrase "Besumeh Kala," which refers to a sweet, pleasant voice. In the context of Birkat Halebana, this word refers to the time when the moon shines brightly and people can derive benefit from it. According to this reading, Rabbenu Yona explains, the Berayta teaches that one should not recite Birkat Halebana until the second or third day of the month, at which point the moon shines brightly. (Our custom in any event is to wait seven days before reciting Birkat Halebana.)
The Hid"a (Rav Haim Yosef David Azulai, 1724-1806), in his work Moreh Be’esba (6:184), writes that one should not recite Birkat Halebana unless the moon shines clearly, without any obstruction at all. This means that even if the moon is visible, one should not recite Birkat Halebana if it is covered by a thin cloud. One should instead wait until the moon is perfectly clear without any obstruction. This ruling also appears in Sha’ar Hakavanot (a collection of teachings of the Arizal), and this was the practice of the Kabbalists in Yeshivat Bet-El.
Nevertheless, although it is proper to follow this view, one may and should recite Birkat Halebana when the moon is covered a thin cloud if he would otherwise forfeit the Misva. Meaning, if it is already the final night when the Beracha may be recited, and the moon is visible through a thin cloud covering, one should recite the Beracha, relying on those Halachic authorities who permit reciting Birkat Halebana under such circumstances. Even the Hid"a formulated his ruling with the word "Yizaher" ("One should ensure"), which suggests that it applies only "Lechatehila" (under optimum conditions), but not if there is no alternative. This is the ruling of Rabbi Moshe Halevi (Israel, 1961-2001), in his work Birkat Hashem (vol. 4, p. 264; listen to audio recording for precise citation).
Summary: One should not recite Birkat Halebana when the moon is covered by a thin layer of cloud, even if it is visible, unless he will otherwise not have the opportunity to recite the Beracha that month.