A Poké Flute's single purpose in the field is to wake up sleepingPokémon, specifically two Snorlax sleeping on Route 12 and Route 16. Doing this is the only way to progress southward in the game, since these Pokémon are blocking the routes, as well as the only way to battle a wild Snorlax. In Pokémon Yellow, it can also wake up the player's Pikachu. If used outside of battle, it will play a "catchy tune".
In Pokémon X and Y, the player has to get the Poké Flute from the Parfum Palace and deliver it to its owner, a Black Belt, who will use it to wake up a Snorlax that is blocking Route 7. Unlike in the Generation I games and their remakes, the Poké Flute is a temporary item, and will only be in the player's possession while it is being delivered.
A Poké Flute is a reusable item that cures all Pokémon in the battle of Sleep, including the opponent's Pokémon. If no Pokémon are asleep, it will have no effect on the battle but still count as the player's turn. This can be useful as it consumes no items or PP.
Playing the Poké Flute will wake up sleeping Pokémon and may make them dance or pose for the player. There are three songs which the Poké Flute can play in this game, and Pokémon respond differently to each.
In the anime
A Poké Flute in the anime
In the main series
A Poké Flute was used by the hippie in Wake Up Snorlax!. He performed concerts with it in exchange for food. Later, he used it to help restart the flow of a river by waking up a Snorlax that was blocking the river.
Another Poké Flute appeared in Awakening the Sleeping Giant!, under the ownership of Lord Shabboneau. It is used in an annual festival involving a Snorlax living in the area near Camphrier Town, but, unfortunately, it had been taken away by the egocentric Princess Allie from the Parfum Palace. After a series of many-sided events, Ash and his friends managed to get the Flute back and return it to Lord Shabboneau so he could start the festival. Team Rocket, believing the Flute could actually control Snorlax, tried to steal it in order to gather themselves an army of Sleeping Pokémon, but the Flute was soon recovered, allowing the festival to be successfully completed.
The Poké Flute is used to wake sleeping Pokémon. Snorlax will only awaken to this flute.
This concludes the entries from the original series.
In Pokémon Origins
The Poké Flute in Pokémon Origins
The Poké Flute was seen two times, although briefly, in Pokémon Origins. It first appeared close to the end of File 2: Cubone, where Mr. Fuji gave it to Red as a thanks for saving him and the Pokémon Tower from Team Rocket. Red later used the Flute in File 3: Giovanni to wake up a Snorlax, which he then presumably caught.