The phrase meaning to pass time idly is while away. It is older and more logical than wile away. But because the second phrase occurs so frequently, it is now included in many dictionaries.
The OED has instances of while away going back to the early 18th century. The phrase employs a now archaic sense of while—namely, to fill up the time. Today, while is used only as a noun or conjunction (except in while away). And because we’re not used to seeing while used as a verb, it’s easy to assume that wile away is the correct phrase.
But wile is mainly a noun—meaning (1) trickery, cunning; (2) a disarming or seductive manner; (3) or a trick intended to deceive—and it’s occasionally used as a verb meaning to influence by wile. None of these definitions has anything to do with idly passing time, so wile away doesn’t make logical sense.
Examples
Although while away occurs about 20 times as often on the web, wile away appears regularly—for example:
But even if a surprise shower rains on your parade, find the museums in your destination in which to wile away the rain hours. [MSNBC]
It’s enough to scare anyone looking to wile away the hours with their families, especially folks who live nearby and feel a certain ownership of the park. [Bakersfield Californian]
But most editorially scrupulous publications use the more sensible while away—for example:
Still, until a Red Web Redemption comes out, Shattered Dimensions looks to be a bright and diverting enough way for Spider-fans to while away a few hours. [Guardian]
You’re at the state fair gates at the crack of dawn Sunday, you get your armband at 8, and now you’ve got nine-plus hours to while away until you and 11,999 of your new best friends get in to see Justin Bieber … [Baltimore Sun]

