Well, in a very primitive and non-accurate sense, it counts/measures the number of (photo synthesis generating) photons hitting each leaves, and then grows in directions that maximizes its photo synthesis.
Since a tree has a much lower number of branches and leaves than there are photons, there has to be some aggregation of information involved in this computational process.
Since a tree has a much lower number of branches and leaves than there are photons, there has to be some aggregation of information involved in this computational process.