I am watching Modern family and I am currently on season 3. In Modern family, season 1 Lily is played by Jaden. In season 2 by Ella Hiller and from season 3 Aubrey Anderson-Emmons. What is the reason behind these frequent changes ? Did the creators want to show a much grown up Lily by season 3?
Looking up the character on Wikipedia reveals that twin actors Jaden and Ella Hiller were replaced by Aubrey Anderson-Emmons. The reasons cited were the twin actresses' mother claimed they did not enjoy acting anymore, thus they "retired", and the role was recast with Aubrey Anderson-Emmons as Lily, who was old enough to provide speaking lines for Lily for the first time in the show.
Going further as a general film production question, the simple matter is that the actor or actress must be able to meet the demands of the character they've been selected to portray. Should the production team feel they're not able to do that at any point, they have the option to recast the role (barring contractual agreements to the contrary).
These rules apply to child actors just as much as adult actors.
Case in point for an adult role, Eric Stoltz was cast to play Marty McFly in Back to the Future. Initially Zemeckis wanted Michael J. Fox, but Fox was unable to get time off from filming the TV show Family Ties, so they cast Stoltz instead. 4 weeks into filming they realized it wasn't going to work and opted to recast with Fox when he was available, even though reshoots would cost $3 million.