Adjust the signal applied to the input of your sound card or audio interface. To use a signal from a microphone, an external mixer or preamplifier is necessary. An audio mixer adds gain to the signal in three places: the channel strip input, the channel volume knob or fader and the master level knob or fader. Balance these to avoid distortion at the input stage while keeping a fader at about the "0" position. Adjust the master level to match the input of your sound card or other digital interface.
Set the input level of your sound card or interface. For simple sound cards this is done by way of the system volume sliders. More sophisticated interfaces may have a set-up screen where you can choose the input range as well as a mixer to adjust signal levels further.
Update your audio device profile within SONAR. From the toolbar select "Options," then "Audio..." from the drop-down menu. In the dialogue box, click on "Wave Profiler" to start the automatic process. Click "OK" when asked if you want to continue and the process will begin. While not directly related to setting levels in SONAR, updating the audio profile assures good overall performance.