To answer your question accurately we need to know a few more details.
what you are using for audio? Do you have an Audio interface or are you using the on board sound chip.
If you have an good audio interface that comes with Asio drivers then always use ASIO.
Sonar performs it's best when it has good ASIO drivers running.
If your audio interface has poorly written drivers, then sometimes you need to try other options like WASAPI, WDM or Asio4all. There's no perfect answer for that situation as each set up will be a little different.
But then the next question
What do you use Sonar for?
I only us Asio4all as example, on a laptop I only work with midi files on.
For audio recording I would not be caught dead without a proper interface.
And John , my test was for offset timing was not really latency, but latency is involved of course.
The fact that only ASIO mode provides Sonar with the information to calculate the latency offset needed to keep overdub recordings synchronized.
Because the playback we will hear will be delayed by output latency, and then is recorded late because of input latency, Sonar actually plays the project AHEAD of time by that amount so we overdub in sync.
In other words if your output latency is reported correctly to Sonar as 7ms. and the input latency is also 7ms then Sonar plays the song 14ms early so it will be in sync. Poorly written drivers don't report properly so it's not Sonars fault if it was lied to.
The loopback test will easily show you that all other audio modes will result in a newly recorded track in most cases Late, so out of sync with the original tracks. It might be so small that many won't even notice but they will wonder why the song is not very tight. The top 2 tracks are a midi and the frozen drum hit. The rest are loopbacks of track 2 recorded in different audio modes. To make a loopback you use a short patch cable from your interfaces output back to an input. Arm a fresh audio track and hit record. Make sure input echo is off and even set the tracks output to NONE.