Agriculture is one of the four areas of scientific advancement.
Planting flowers is purely decorative and is unlocked from the start of the game.
Planting trees is a method of tree replenishment that us unlocked when the second level of the 'Agriculture' science advancements is unlocked. With tree planting, the tribe can grow more trees on their island, thus making wood an infinite resource.
Farming is a food-gathering mechanic that is unlocked when the third level of the 'Agriculture' science advancements is unlocked. With agriculture, farms can be placed in the village and tribespeople with the agriculture task checked off will automatically sow seeds in the farm plot and harvest the crops when they are ready. This will give the tribe the 'vegetables' resource for potion making and food for the tribe. It is a much more efficient form of food gathering in the game, since fishing takes a while to gather one unit of fish while farming yields more food units in less time than it would take to gather the same amount of fish.