Prior to the discussion of the elements of the dream, Lehi tells his family why he feels the dream has been important. Whatever general lessons we, in the modern day, learn from the dream of the tree of life, to Lehi it was very personal, and involved his immediate family. It gave him joy (in Nephi and Sam) and intense sorrow (for Laman and Lemuel). I suspect that Lehi tells his family the dream for the sake of Laman and Lemuel, in the hope that by so telling it they will see their course and turn to the Lord.
This putative purpose in Lehi presenting his dream is almost lost in Nephi's account, because the story also becomes intensely personal for Nephi. One of the lessons here is that what we may do specifically for one, may have an intensely positive but unplanned effect on another. The spirit can take our intentions and use them for even greater purposes.
Historical background: The vision which follows is well known as the "Tree of Life" vision. As a symbolic story revolving around a ancient symbol, some background is warranted. The tree is a nearly world-wide symbol of the conduit of communication between the upper and lower worlds. It therefore can stand for revelation, closeness to God, or the benefits of God. It serves these functions even when far removed from Judeo-Christian tradition. The tree of life symbolism is well known for the Near East, the Far East, and Mesoamerica.
The Judaic tradition of the Tree of Life combines several elements which tend to go together, the tree, the fruit, and a fluid which at times is the juice of the fruit, and more often is water which issues from the Tree, or from nearby. The Tree of Life in Lehi's vision shares some of these elements, but has some very specific differences, which will be noted in context.
While Lehi's vision may depart from classical Tree of Life mythology, it nevertheless shares a long tradition of visions in which trees and water serve as major motifs. John W. Welch has described a document from antiquity which has interesting structural and thematic parallels to Lehi's dream. His article is entitled "The Narrative of Zosimus and the Book of Mormon" (FARMS publication).
The "Narrative of Zosimus" was originally written in Hebrew "and appears to be at least as old as the time of Christ, and perhaps much older" (Welch, "The Narrative of Zosimus and the Book of Mormon" p. 311). Points of correspondence are the righteous man entering a desolate area (Lehi in the wilderness, Zosimus in the desert) and imagery prominently involving a tree and a river. There is also the correspondence of a spiritual guide, which is more prominent in Zosimus than Lehi, but yet present in each.
A major structural difference which Welch does not point out is that while both trees (Lehi's and Zosimus') have fruit, the fruit is the critical element in Lehi's vision, and only a side reference in Zosimus. The function of the tree in Zosimus is to lift him to a different plane, which uses the function of the tree of life as a conduit, but is not part of the fruit imagery.
The interesting part of the Narrative of Zosimus is that it is an example of Tree of Life imagery from antiquity which does not fit the expected mold of Judaic mythological tradition. In that way, it serves as an excellent model for the Lehi dream, which also borrows some of the tradition, but differs in other ways.
A final note to the precursors of the Lehi dream has to do with the effect of the dream on the plates on Joseph and his family. When Joseph Smith, Jr. translated this part of the plates it likely stirred his soul, as it closely related to his own experience. Joseph Smith, Sr. was also a "visionary" man, having had several symbolic dreams (a trait also apparently shared by his mother). One of those dreams is reported in Lucy Mack Smith's History of Joseph Smith:
"In 1811, we moved from Royalton, Vermont, to the town of Lebanon, New Hampshire. Soon after arriving here, my husband received another very singular vision which I will relate:
"I thought," said he, "I was traveling in an open, desolate field, which appeared to be very barren. As I was thus traveling, the thought suddenly came into my mind that I had better stop and reflect upon what I was doing, before I went any farther. So I asked myself, 'What motive can I have in traveling here, and what place can this be?'
My guide, who was by my side, as before, said, 'This is the desolate world; but travel on.' The road was so broad and barren that I wondered why I should travel in it; for, said I to myself, 'Broad is the road and wide is the gate that leads to death, and many there be that walk therein; but narrow is the way, and strait is the gate that leads to everlasting life, and few there be that go in thereat.'
Traveling a short distance further, I came to a narrow path. This path I entered, and when I had traveled a little way in it, I beheld a beautiful stream of water, which ran from the east to the west. Of this stream, I could see neither the source nor yet the mouth; but as far as my eyes could extend I could see a rope, running along the bank of it, about as high as a man could reach, and beyond me was a low, but very pleasant valley, in which stood a tree such as I had never seen before.
It was exceedingly handsome, insomuch that I looked upon it with wonder and admiration. Its beautiful branches spread themselves somewhat like an umbrella, and it bore a kind of fruit, in shape much like a chestnut bur, and as white as snow, or, if possible, whiter. I gazed upon the same with considerable interest, and as I was doing so, the burs or shells commenced opening and shedding their particles, or the fruit which they contained, which was of dazzling whiteness.
I drew near and began to eat of it, and I found it delicious beyond description. As I was eating, I said in my heart, 'I cannot eat this alone, I must bring my wife and children, that they may partake with me.' Accordingly, I went and brought my family, which consisted of a wife and seven children, and we all commenced eating and praising God for this blessing.
We were exceedingly happy, insomuch that our joy could not easily be expressed. While thus engaged, I beheld a spacious building standing opposite the valley which we were in, and it appeared to reach to the very heavens. It was full of doors and windows, and they were all filled with people, who were very finely dressed.
When these people observed us in the low valley, under the tree, they pointed the finger of scorn at us, and treated us with all manner of disrespect and contempt. But their contumely we utterly disregarded. I presently turned to my guide and inquired of him the meaning of the fruit that was so delicious. He told me it was the pure love of God, shed abroad in the hearts of all those who love him, and keep his commandments.
He then commanded me to go and bring the rest of my children. I told him that we were all there. 'No,' he replied, 'look yonder, you have two more, and you must bring them also.' Upon raising my eyes, I saw two small children, standing some distance off. I immediately went to them, and brought them to the tree; upon which they commenced with the rest, and we all rejoiced together.
The more we ate, the more we seemed to desire, until we even got down upon our knees and scooped it up, eating it by double handfuls. After feasting in this manner a short time, I asked my guide what was the meaning of the spacious building which I saw.
He replied, 'It is Babylon, it is Babylon, and it must fall. The people in the doors and windows are the inhabitants thereof, who scorn and despise the Saints of God because of their humility.' I soon awoke, clapping my hands together for joy."
(Smith, Lucy Mack. History of Joseph Smith by His Mother. Bookcraft, Salt Lake City, 1979:48-50).