Beer varies widely, and one of the most noticeable differences when drinking is the carbonation level. What factors in the composition, brewing process, storage, etc affect the final level of carbonation?
There are two main ways to carbonate beer.
Force carbonation - This is where CO2 is forced into the fermented beer. Because of the pressure (and the temperature at which it is done) the CO2 will dissolve into the beer solution. The fizz that happens when you open a beer is the CO2 coming out of solution. (Technically you can re-carbonate flat beer!)
Natural carbonation - All beer has SOME yeast present. Home-brewers that bottle will actually pour a little bit of sugar into the racked beer before bottling. The yeast that is present will re-activate and eat the sugar. One of the bi-products is CO2. Because the beer is bottled and the CO2 has nowhere to go, it will dissolve into solution. This is why you will often see little yeast cakes in the bottom of home-brewer's bottles.
There are some beers that used forced-nitrogen to nitrogenate (if that is the appropriate word) their beers.
TL;DR - Temperature, methods of carbonating, storing beer can all affect carbonation.
I have a similar question, but interpret the original question differently - probably because I am a home brewer that lets the beer carbonate naturally. If you are forcing CO2 into the beer, I imagine you have greater control over levels of carbonation. However, I understand that the final gravity, alcohol content, amount of sugar, and temperature have the most significant impact on carbonation in the bottle. The primary factors would be Lower FG and ABV will increase carbonation, and secondarily a little more sugar and time (>3weeks) will increase carbonation. This all assumes you are storing the beer in a temp range that makes for happy yeast.