It is decent in UU, but will have a harder time in the OU environment. Pair it with a Nosepass to kill Skarmory.
This is really the only set that works for Yanma. If you are slower, Protect to gain the Speed advantage and continue to Substitute down to 1 HP and Reversal away with the Liechi boost. Hypnosis is more useful, though, as you can smack Skarmory / Weezing / Metagross before they dispose of you. If you don't have Protect, you'll need to bring out Yanma against something that's slower than you, because you need a turn or so to get that Speed Boost to beat stuff. Yanma can't use Signal Beam with Reversal.
This set takes advantage of the ability Compoundeyes to boost the accuracy of Hypnosis to 78%.
Yanma's Special Attack is higher than its Attack, so you can try out a special sweeper if you'd like, with moves like Hypnosis, Psychic, Giga Drain, and a special Hidden Power.
Max Attack, and put 8 EVs in HP (12 if you use a Hidden Power that cuts HP IVs), then put the rest (should be either 244 or 248) into Speed. This is to make it able to land at 1HP with Substitute, for Reversal.
Checks and Counters
Tyranitar is the biggest one as you won't be able to pull off Reversal thanks to Tyranitar's Sand Stream.
Skarmory, Donphan, and Suicune can wall your hits all day, and then Roar / Whirlwind you away. Weezing has Haze and resists Reversal and Hidden Power Bug. Metagross, Jirachi, and any other high Defense Pokémon that isn't weak to Fighting, Bug, or Ghost can easily take on the Reversal set, and those that aren't weak to Bug, Flying, and whatever Hidden Power Yanma uses can come in easily. Even if they are weak to the move, if they are defensive or have Intimidate, they can take on Yanma easily. Rhydon and Armaldo can use Rock Blast on Yanma, ending any chance of it being safe behind a Substitute. They all just have to worry about Hypnosis.
As for UU, every team is infested with Quick Attackers, so if your team didn't already have one, you were going to get swept by this anyway. Gligar makes a good counter with its high Defense and resistance to both Fighting and Bug. If Yanma doesn't have a Ghost attack, Misdreavus puts a stop to it. Much like Rhydon and Armaldo, Golem can come in and use Rock Blast to put a stop to this dragonfly.