Although that is a somewhat complex question, if you just want a simple solution to get the volume up, you can insert a compressor in the Master bus. I don't know if it is still included with the current version of Sonar, but this limiter called Boost 11—despite its many critics—could get the level up without messing up the sound too much if you played with the settings.
Personally, I let a mastering engineer do the final tweaks, but just for listening for myself before it's time to make a real record, I use EZMix. There is a separate Mastering module you can buy for it and several of the presets are good enough for most purposes.
Before you get to the point of export, though, be sure the low end is not eating up your bandwidth. For example, most people use the Pro Channel High-Pass filter on almost every track (except kick and bass) to cut out everything below a certain frequency (like everything below 100 hz or so on a guitar). Sometimes there is a lot of noise, rumble, and even inaudible stuff that pushes the meter up but doesn't really contribute to the sound. Even on bass, I usually cut below 50-60 hz. Also, some people tend to mix the kick and bass too loud and that really eats up your headroom. (I tend to err in the other direction.) For example, you can see a bass guitar that sounds fine pushing the meter up to the red, while a painfully loud high guitar note may just register a third of the way up the scale.
Also be sure your overall mix BEFORE compression peaks at a healthy level. (Some say -6, some say -3). If the overall level is extremely low, it will be hard for a compressor to bring it up all the way without affecting the sound adversely.
Good mastering engineers use a variety of tools and techniques and make decisions based on years of experience and listening in a pristine environment.
Some online research will be very interesting, although I am afraid no one will have a simple answer. The closest thing to a simple answer is mix at a good level, watch your low end, and put a compressor on the master bus—but don't go crazy with it.