The most-frequently offered answer to this is as follows:
Southern jazz musicians apparently used to call a performance - what we might call a 'gig' today - an 'apple'. (Don't ask me why!) When they got a booking in New York, that was seen as the tops, proof that they'd finally 'made it'. As a result, NY became 'The Big Apple' and the name simply caught on.