Sometimes you hit notes you don't want to hit, particularly if you're playing MIDI guitar or some other alternate controller (although this tip is most relevant to MIDI guitar, even with keyboards you may end up brushing against some keys accidentally and creating notes you don't want). Here are some ways to clean up your data stream.
Delete pressure data. Your controller may generate pressure (aftertouch) and your sequencer might record it...but does your synth preset respond to it? If not, the pressure data is just taking up space. If you didn't filter it out on the way in, delete it now.
Short note glitches. Sometimes you'll find notes with extremely short durations, and you have no idea how they got there. You'll usually find these because you experience some kind of problem during playback, but can't see the notes because they're so short. So, use your sequencer's data filtering option (it's called different things in different programs, like Logical Edit, Find and Replace, etc.) to select only notes shorter than a certain number of ticks—the best number depends on the sequencer's resolution, but it's a pretty safe bet notes with durations shorter than 10 ticks aren't intentional).