Yes, the title is a reference to the classic 'the chicken or the egg' question but it does to tie into the idea that I want to talk about, did Ewya create the Na'vi or did the Na'vi create Ewya. I'm going to view Ewya as a more measureable/explainable force than the mystical ideas that some have on this forum.
Firstly lets talk about how Ewya evolved. If we assume that Pandoran life evolved with the ablity to share thought patterns and the structure of the trees allowed such patterns to be recorded, then we have an possible way that Ewya evolved, as an amalgamation of these basic thought patterns (I wouldn't call it a being yet). At this time I wouldn't say that Ewya controled or directed Pandoran evolution, but instead acted more as checks and balances, like a physic version of the Gaia principle. When prey animals are being hunted too heavily, the thoughts of distress they create in the system causes the predator animals to also be distressed and reduce thier hunting activities.
As Pandoran life becomes more advanced, more complex thought patterns are added to the Ewya creature, increasing its self-awarness and possible meaning it starts to having more direct influence over Pandora. But self-awarness does not mean true sentience. Then the Na'vi evolve and thier highly complex and sentient thought patterns are added to the mix. Here is the nub of the matter, did the Na'vi create the Ewya being. If you kept adding sentient thought patterns to a creature at some point you are going to create a mind that can create its own thought patterns.