The trick to getting the right level of air in your tires is to watch the pressure of the tire itself. Each tire will have a guide, written on the side of the tires (or, you can look up your tire online for this information), which is the limit of your tire pressure in PSI or bar.
A properly inflated bike tire should make your bike comfortable to use, as it will neither bounce around too much, nor will it have a complete lack of shock absorbency. As a general rule for mountain bikes, the tire pressure should be around 35-50 PSI.
Remember that, the more you weigh, the higher the pressure will need to be. Similarly, where you ride will affect the correct level of pressure- with road tires needing a much higher PSI and hybrid tires being between the two.