It's not straightforward
As you may have heard, Nintendo has dropped the Pokemon Bank and Transporter Apps today on the North American eShop. These are two separate apps, but you'll only need to access the bank before September 30th, 2014 to get your free Celebi.
So how do you do it? Well, log into the Bank App, tie in your Nintendo Network ID (you'll need to get one if you don't have one already), then select a "gift" from the menu, and place one Pokemon in a cloud box.
Then, load up Pokemon X or Y, and go to the bottom option, "Pokemon Link." Redeem your prize, then go back to the Pokemon Bank and hit the "use bank" option. Finally, go back again to your X or Y game, hit "Pokemon Link" again -- Celebi will be waiting for you on the in-game PC.