You need to sit down and work out the quantize resolution for each track. In fact it's probably better to take each MIDI clip as a separate case.
To find the resolution, take the shortest note length of the clip you want to quantize. For instance, if your clip contains 32nd notes then you're going to want to quantize to 32nd notes. If it has triplets in it then you're going to want to quantize to those triplets.
Lets say it has 16th note triplets but also straight 8ths. Quantizing to 16th triplets will work out well because those 8th notes will line up with the first note of each triplet group.
However, it may be that your piece has a combination of note lengths which means that quantizing to a particular resolution may work for some notes but not others. For example you may have a series of straight 8ths with the occasional flurry of 32nd triplets. If you quantize this to 32nd triplets, it may be that your performance of the 8th notes was sufficiently off so that the quantize process nudges them just off the beat to the next 32nd triplet instead of right on the beat where they should be.
In circumstances like this, I will often quantize groups of notes separately. I'll lasso the 32nd triplets and quantize those appropriately, then select the 8th notes and quantize those to 8ths.
If you try and quantize a whole song, it is very unlikely that it will work out well. Sonar has no way of knowing what your original rhythmic intentions were, and some of your notes are bound to end up quantized to the wrong positions. There is no "one size fits all" setting.
But once you get into the swing of quantizing, you can actually get through it very quickly. There are other settings to think of, but they're all pretty self explanatory. You can adjust the quantize strength, which will offset the notes by a few ticks so they don't sound too mechanical, and also swing, which introduces a dotted feel to the degree that you set it.
Sometimes quantize can be used creatively to get a totally new feel. I will oftentimes take a straight MIDI drum pattern and quantize it to 16th triplets, for example. Have fun!