Leviticus 19:24 "But in the fourth year, all its (the tree's) fruit shall be holy for praise-giving to the L-rd"

A tree's fruit cannot be eaten for the first three years of its growth (see Negative Mitzvah 192).

The farmer must take the fruits of the fourth year to Jerusalem and eat them in the city.

This helps him realize that, despite all his toil and labor, it is HaShem that actually causes the trees to flower and the fruit to grow.