Eren's father injects him with the Titan serum years before he first uses it. So how is it that he remembers how to activate it?
I don't know how far the anime is yet, so I'll put it into a spoiler.
The shift between human is triggered by any injury that causes blood loss. The first shift is triggered when Eren gets eaten by one of the titans and hurts his arm. To trigger the next one, he bites himself to protect Mikasa and Armin. Apparently, also the will to accomplish something is needed to become a titan (kill the titans, save his friends)
I would imagine in order to transform the first time that you would have to be in very clear danager and would subconsciesly desire the change. He didn't have any concept that he could and something like getting cut on a tree would certainly not be dangerous enough to warrent the subconsciese into activating.
I would wager though that once he changed the first time and figure out he could do it it bacame much easier because he knew he could. It would be like discovering a secret talent that you had (wiggling your ears or something). You technically could always do it but without strong reason (someone telling you to try) you would never knew you could. Once you discovered you could, it would be much easier to access. (sorry if that's a bad example, not a lot of parallels to turning into a titan :p )
Another idea (though less likely imo) is that age has something to do with it. Maybe you have to mature to a certain point before it's possible. It just happened that he was finally of age/ ability at that point to turn and, with the obvious situation of being eaten, could at that point turn.