It's a delicate balance that goes by several different names: gain staing, gain scaling, etc.
The key word is gain. What you pretty much want to do is to achieve "unity gain" through every piece of hardware in the recording chain.
In a relatively simple chain, you would bring the microphone to the desired level into the recording device, then add a compressor to the output of the mic-pre and add "gain makeup" to compensate for the "gain reduction" that occurs when using a compressor.
The idea being that if a signal isn't hot enough you'll bring up undesired noise artifacts, and if you drive the hardware too hard, you'll distort the amplifiers that comprise the hardware.
As you get more advanced with the process you can make up for certain inadequacies of some of the lesser equipment within your arsenal. Things like cheap mixing consoles don't really have enough of a power supply to properly form a bass tone nor respond to transient signals properly... so if you drive them "colder", you'll be able to tax their power supplies less, which will net you a better overall bass and transient reponse.
Best of luck with it.