The Shulhan Aruch (Orah Haim 202) discusses the case of "Boser" – a fruit which has not yet ripened and is still very small – and rules that an unripe fruit is "downgraded" with respect to Berachot. Thus, for example, a fruit over which one would normally recite "Boreh Peri Ha’etz" would require the lower-level Beracha of "Boreh Peri Ha’adama" if it is not ripe.
However, if a fruit has grown but has yet to fully ripen, then as long as it is edible, one recites the standard Beracha. Even if one would eat this fruit only "Al Yedeh Ha’dahak" (under extenuating circumstances), nevertheless, as long as the fruit has grown and is edible, it requires its standard blessing.
A common contemporary example would be a green tomato. Although people do not generally eat green tomatoes, nevertheless, since it can be eaten, and it can be pickled and then enjoyed, one recites over such a tomato the standard Beracha of "Boreh Peri Ha’adama." This is the ruling of Hacham Ovadia Yosef, based on the aforementioned ruling of the Shulhan Aruch.
Hacham Bension Abba Shaul (Israel, 1924-1998) disagreed, noting the opinion of the Gaon of Vilna (Rabbi Eliyahu of Vilna, 1720-1797) that a vegetable requires the Beracha of "Ha’adama" only if it has reached the stage at which tithing would be required in the Land of Israel. Since tomatoes do not require tithing so long as they are green and not fully developed, they do not, according to the Gaon, warrant the Beracha of "Ha’adama." Hacham Ovadia, however, in light of the ruling of the Shulhan Aruch, and based on the Ben Ish Hai, maintained that one recites "Ha’adama" over a green tomato.
Seeds of various species of fruits and grains are commonly sold and eaten, such as sunflower seeds, pumpkin seeds and watermelon seeds. The Hid"a (Rav Haim Yosef David Azulai, 1724-1806) noted the custom to recite "She’ha’kol" over seeds, but the consensus of modern-day Poskim is that in our day and age, when there is an entire industry of seeds, the proper Beracha of "Ha’adama." The sunflowers, pumpkins and watermelons are grown with the intention of marketing their seeds for consumption, and therefore, they are considered like ordinary vegetable products, and require the Beracha of "Ha’adama."
Summary: Fruits or vegetables require their standard Beracha even if they are not fully developed, as long as they are edible, and thus the Beracha over green tomatoes is "Ha’adama." The Beracha over commercially sold seeds – such as sunflower seeds, pumpkin seeds and watermelon seeds – is "Ha’adama."