The second verse in Psalm 1 is "Their delight is in the law of the Lord, and they meditate on his law day and night." Patrick Woodhouse explains that the "law of the Lord" means more than just the law found in the first five books of the Bible - it really means the presence of the God and thus they delight in God and want to be with Him day and night. The law is life-giving and they want to delight in the teachings given by God, but also find God present in them and so want to keep thinking about Him.
Then comes the wonderful image as verse 3 "takes us into one of the great metaphors of the Psalms. Those who meditate on the law of the Lord are like a tree, planted by the waterside. In just a few sparse phrases the poet paints his rich picture of a great tree with its roots going down into the flowing waters so that the moisture is drawn up through the trunk and out into the spreading branches, bearing fruit in due season, with leaves that do not wither'. The image wonderfully fertile." (Woodhouse, p.92 in Life in the Psalms)
I have always loved this metaphor. It is found elsewhere in the Bible. God gives the fruit in due season, but this verse ends with the promise of prospering in whatever we do.