According to the jazz history exhibit at the Smithsonian...
It has something to do with jazz musicians and the 1920's or 30's. I believe one musician in particular was credited with it - but I can't remember whom.
'Apples' was a term that meant city, and since New York was the place to play - it was dubbed 'The Big Apple'.
There is more to the story, but quite frankly I wasn't that interested when I was wandering through. However, that apprently is the jist.