The vine and fig tree are symbols of Israel’s safety from enemies during the days of Solomon (1 Kings 4). The fact that each Israelite has his own orchard and vineyard is a sign of national prosperity and widespread distribution of wealth, as well as a sign that there are no invaders coming to take Israel’s harvest (as does happen later).
But the phrasing of 1 Kings 4 is interested: Israel dwelt in safety, every man “under his vine and fig tree.” It’s as if the vine and fig tree provide some sort of shelter of protection. They are not merely signs that the people are sheltered (perhaps by Solomon’s military might); they are the means of protection, the shelters. It is like a permanent feast of booths, with Israel living in tree forts.
Read in that fashion, the verse is more mysterious than we might have thought: These seem a thin defense against invasion. How can vines and fig trees provide safety? Perhaps the idea is something like this: Every Israelite has his own vine and fig tree, each enjoying the fruit of the land as a gift from Yahweh; so long as they rejoice in Yahweh’s gifts, they have nothing to fear.
Perhaps too the vine and fig tree shelters also anticipate the later temple. As every Israelite is under his own vine and fig tree, so all Israel is safe under the shelter of the temple and its Lord. That fits the way later OT and NT texts connect the vine/vineyard and fig tree with the temple (cf. Isaiah 5; Mark 11). And it also highlights the character of Israel’s safety: Solomon keeps the people safe not by building a fortress in Jerusalem but by building a house for Yahweh.