This colloquial expression derives from the fact that the white keys of piano keyboards used always to be veneered with ivory, and a few still are.
'Tickle the ivories' isn't an old expression and dates from the early 20th century. 'Tickling' had long been used to describe playing musical instruments before that term was coined. For example:
Thomas Nashe's The anatomie of absurditie, 1589: "To tickle a Cittern, or have a sweete stroke on the Lute."
William Somerville's Hobbinol, or the rural games, a burlesque poem, 1740: "Hark from aloft his tortur'd Cat-gut squeals, He tickles ev'ry String." [presumably the violin]
Account Books of the Annual Register, 1770: "One of them began to tickle his guittar."
The first person to 'tickle the ivories' was very likely to have been American. as the expression appears there in print long before it is seen anywhere else and is, in all probability, of US origin. The earliest citation of it that I have found is from the Fort Wayne News, January 1906, in a piece entitled "He can choke a wolf or play the piano". This bit of nonsense praises the exploits of a Colonel John Abernathy and, to emphasize their point, they helpfully provide an etching of the good Colonel engaged in both activities.
"Col. Abernathy can pull a gun as quickly as any man in the territory. He is a man of action, such as the president admires. He has long sinewy fingers over which he has admirable control. He can 'tickle the Ivories' with the best of them - an accomplishment seldom achieved by an ex-cow puncher and bronco buster, and on occasions those same long fingers can wring the last howl from a prairie wolf's throat."