One core truism here is that the better you understand the right notes, the easier the wrong notes become. So, what are the right notes? Actually, it's sometimes better to think of it less as a binary division between wrong and right than a continuum. If I'm playing some minor pentatonic stuff for example (R b3 4 5 b7) and I add in the sixth, then is that a wrong note? Or am I just adding a slightly Dorian (R 2 b3 4 5 6 b7) flavour?
In general, the idea is that larger forms (seven note scales, chromatic scales) will contain more 'weak' notes than smaller ones like triads. So one of the first things to do when working on wrong notes is to work on being able to hit the notes of the chord whenever you want, so that it becomes easier to go the other way. In terms of their strength (how well they fit with the chord they're going over) here are some ideas ordered from most 'in' sounding to most 'out'.
- The root note of the chord
- The other notes of the chord
- Imaginary extensions to the chord built from the relevant major or minor scale, and particularly the seventh
- A suitable pentatonic scale
- A suitable seven note scale such as the major or minor
- An eight note scale, or a seven note scale with one carefully chosen extension, depending on how you want to look at it.
- The full twelve note chromatic scale
A classic tactic is to fill in the gaps of a pentatonic scale, particularly on the guitar where it provides conveniently 'box' shaped two note per string fingerings. The trick is to play those two notes, but to play all the ones in between too. The idea is that if you start and end on a good note, the stuff in between sounds deliberate.
Another option is to take whatever chord or scale you're playing off and move it a half step, because a minor second is quite a dissonant interval. You can be more sophisticated with this by using the idea of approach notes, approaching a series of strong notes (particularly chord tones) from a fixed interval above or below.
Those are just ideas to get started with, but they're worth playing around with.