The phrase "the apple of his eye" seems to have a more ancient origin than one might think. From a quick Google search of the phrase, Psalm 17:8 pops up with the following:
"Keep me as the apple of the eye, hide me under the shadow of thy wings, From the wicked that oppress me, from my deadly enemies."
This verse shows that the phrase dates back to Biblical times and is used along with a plea for protection. Then, dating even further back, a verse in Deuteronomy 32:10 uses the phrase a little differently: " He guarded him as the pupil of His eye." Based on the wording of this verse, it seems as if the apple represents and refers to the pupil of one's eye. Again, the plea for protection, or to be guarded, accompanies the phrase.
Therefore, if the king's daughter is the "apple of his eye," then that would mean that she is the only thing that he sees because she would be his pupil figuratively speaking. Another way to say it is that his daughter is the only thing he is concerned about in his world. Not only that, but she is the one thing that he guards and protects by hiding her under his wings or protecting her from enemies. If this is the case, then it is no wonder that he protects his daughter in the only semi-barbaric way he knows how--by sending her forbidden lover to the arena to face the lady or the tiger rather than her.
The phrase, or saying, is actually "the apple of his eye," not "the apple in his eye," as can be seen in the following quotation from the story.
This semi-barbaric king had a daughter as blooming as his most florid fancies, and with a soul as fervent and imperious as his own. As is usual in such cases, she was the apple of his eye, and was loved by him above all humanity.
This was a common expression when the story was published in 1882 but has faded from popular usage by this time. An apple is both beautiful and sweet-tasting. The king's daughter was the apple of his eye because she was his favorite object in the world. As the quote says, she "was loved by him above all humanity." He wanted to look at her and he wanted to be with her. She was the one thing he thought about during his waking hours, and no doubt he dreamed about her when he was asleep.
According to an article in Wikipedia, the expression was still used in the 1950s. There was a popular song titled "You're the Apple of My Eye."
"You're the Apple of My Eye" is a song written by Otis Blackwell and initially recorded and released as a single in 1956 by The Four Lovers, the precursor to The Four Seasons.
Shirley Temple also recorded a song which contained the words, "You're the apple of my eye," when she was a little girl. Stevie Wonder used "You are the apple of my eye" as part of the lyrics in his song, "You Are the Sunshine of My Life." Google has a number of references to the phrase "You're the apple of my eye."