During a battle, the user flashes a light that reduces the foe's accuracy by one stage.
Outside of Battle
Outside of battle, Flash can be used to light up caves that are so dark inside you can't see anything without Flash. They will then stay lit up until the player exits the cave. If the player re-enters the cave, it will be dark again.
To obtain Flash, you must first have at least 13 completely identified pokémon in your Pokédex. Capturing or evolving pokémon will completely identify it. You may release captured pokémon afterwards, if you don't need them.
After identification, go to Diglett's Cave exit on Route 2. Follow the road downwards and you will reach a building. Inside, talk to Prof. Oak's Aide and he will give it to you.
(Confirmed on FireRed)
The TM for Flash is obtainable by beating the Elder at the top floor of the Sprout Tower
After you have gotten to Dewford Town, you will find Granite Cave at the end of town. When you go into the cave you will find a hiker at the start. Talk to him and he will give you the HM for flash.
In Castelia City, a man in an alleyway will give you the move flash.