I recently came across an image dump of all shiny/non-shiny Pokémon's QR codes. Before I start scanning away, I'd like to know what benefit all these codes will get me. What does scanning the QR codes for Pokémon do?
A couple of things:
1) It adds them to your Pokédex as "Seen" Pokémon, so you can check the map for their catch locations (and I think activates the "This move will be Super effective" / "Effective" / "Not very effective" message in the battle screen?)
2) After scanning ten codes, you can activate the "Island Scan" feature, which spawns a rare (in Alola) Pokémon somewhere on the island you are currently on for 60 minutes.
You can scan ten codes a day, after which it slowly recharges over time.
Scanning a Pokémon's QR code will register you as having seen it, in your Pokédex.
As an added benefit registering 10 Pokémon, even if you have seen them before enables you to perform an Island Scan for rare Pokémon. These Pokémon vary by day of the week and by island, for a total of 28 different Pokémon. They are not otherwise obtainable in game. The scanned Pokémon will appear at a random location on your current island, and you will only get a single encounter with it.
You can scan an additional Pokémon every 2 hours, and store up to 10 scans in total.
Additionally to the above answers, there are also special event QR codes that can award event Pokémon.