The existing answers to this question are quite poor.
Chamber pressure is a design choice. While the equations for rocket engine performance can make it seem like chamber pressure is a function of mass flow or throat area, it is really the opposite: these are a consequence of your selection for chamber pressure. A typical liquid rocket engine features deflagrative combustion, that is to say that there is negligible pressure gain produced by the combustion. Instead, all the pressure in the chamber is provided by the injection. So to increase your chamber pressure, you run your pumps faster, or you pump more helium into your propellant tanks. Both of these options increase the pressure upstream of the injectors. There is some pressure loss (~10%) through the injector, and then that is your chamber pressure.
Engine designers will typically start with a thrust value that they want their new engine to meet. The thrust is directly proportional to chamber pressure via the thrust coefficient ($C_f$) with the following equation:
$$C_f \equiv \frac{F}{A_t P_c}$$
The thrust coefficient has a nasty formulation, but it is constant for a given nozzle at a given altitude. Here $F$ is the engine thrust, $A_t$ is the throat area, and $P_c$ is the chamber pressure. So a designer, after choosing their desired thrust, can calculate or make an educated guess on the thrust coefficient their nozzle will provide (typical ranges are 1.2 to 1.8), then compute the required product $P_c A_t$. If they want a small engine with a small throat area, they need a larger chamber pressure, or they can get away with a lower chamber pressure if they use a larger throat area, but you can see that to maximize thrust, you would want high chamber pressure and a large throat area. As I mentioned before, they then configure the propellant supply to provide whichever chamber pressure they choose.
Regarding mass flow, this is the critical factor for engine efficiency (to provide the same thrust with less mass flow is the bee's knees). Just like thrust, it is directly proportional to the chamber pressure, but inversely proportional to the square root of temperature. And, just like thrust, there is a parameter relating the mass flow to the chamber pressure, called the characteristic velocity (or cstar):
$$C^*\equiv \frac{A_tP_c}{\dot{m}}$$
The characteristic velocity ($C^*$) is constant for a particular propellant combination and combustor and tells the engine designers how much mass flow ($\dot{m}$) a particular chamber pressure and throat area combination will produce. To reduce the mass flow, you desire a higher characteristic velocity. The formulation is, again, very nasty, but higher values are achieved with increased flame temperature and lighter molecular weights of the combustion products. This is why Hydrogen is a popular choice for propellant, because it offers both of these advantages.
These two parameters I have mentioned, the thrust coefficient ($C_f$) and the characteristic velocity ($C^*$), represent the performance of the nozzle and combustion chamber respectively. Together, they give a measure of the entire rocket engine. You can formulate the specific impulse (a key engine performance parameter) by combining these two values:
$$I_{sp}= \frac{F}{\dot{m}g} = \frac{C_fC^*}{g}$$
Here $g$ is the acceleration due to gravity at sea level. This discussion highlights how and why designers choose particular chamber pressures (though I didn't include many nuances in the tradeoffs of this choice).
A final note on the injection system. As I mentioned, the two primary methods for providing the injector head (upstream pressure) are pumps or tank pressure. To yield the benefits of high chamber pressure, you need beefy pumps and/or beefy tanks and all that implies.
A final final note on the other answers:
The answer of Declan Nnandozie suggests that the isentropic flow relationship between pressure ratio and exit Mach number would be used to compute chamber pressure. This is total nonsense. While you can compute your exit Mach for a given nozzle, and you can thus compute the nozzle pressure ratio, you can't use this to compute your chamber pressure. The exit pressure (he calls environmental pressure) is independent of the environmental pressure. His suggestion only works if you are dealing exclusively with perfectly expanded nozzles (with exit pressure equal to ambient pressure) which is a very narrow operating condition.
The answer of Kaan Guven is more on track, but misses the key design process, which is to say that thrust is the starting point for any rocket design.