Why we write the constant in front of the Einstein-Hilbert Action? Why we write the constant?
$$S_{EH}=\frac{c^4}{16\pi G}\int \sqrt{-g}R d^4x$$
 A: You need a constant with proper dimensions, because $\sqrt{-g} \;d^4 x \sim \mathrm{L}^4$ (an "hyper volume"), while $R \sim \mathrm{L}^{-2}$ (a "curvature").  Then, the integral has dimensions $\mathrm{L}^2$ (like an area).  Yet, the action shouldn't have any dimensions, in natural units (or if you set units such that $\hbar = 1$).  You then need a constant like $c^4 / G$.  The $16 \pi$ is a convention to simplify calculations and to get the Newton's gravitational constant in the non-relativistic limit.
It is usually much easier to use Planck's units, such that $c =1$, $\hbar = 1$, so $G \sim \mathrm{L}^2$ (the square of the Planck's length).
Also, it is much simpler to use $\kappa \equiv 8 \pi G / c^4 \sim \text{meters}/\text{joules}$ as the relativistic gravitational constant.  Thus:
$$\tag{1}
S_{\text{grav}} = \int_{\mathcal{M}} \frac{1}{2 \kappa} \,R \, \sqrt{-g} \; d^4 x \sim \mathrm{L}^0.
$$
From the comments:
Action has dimensions "energy" $\times$  "time".  It is the same in relativity (I don't add a $c$ factor yet).  We may divide the action by $\hbar \sim$ "energy" $\times$ "time" to get an unitless quantity, to simplify things.  So basically, action don't have units (thanks to QM !).  But then (in some cartesian-like coordinates):
$$\tag{2}
d^4 x = c \, dt \: dx \: dy \: dz \sim \mathrm{L}^4,
$$
and $R \sim \mathrm{L}^{-2}$.  So if you write
$$\tag{3}
S \propto \int R \, \sqrt{-g} \; d^4 x,
$$
you then need a factor to remove its $\mathrm{L}^2$ units.  The constant $\hbar G / c^3 \sim \mathrm{L}^2$ has it.  So we get:
$$\tag{4}
S = k \frac{c^3}{\hbar G} \int_{\mathcal{M}} R \, \sqrt{-g} \; c \, dt \: dx \: dy \: dz = k \frac{c^4}{\hbar G} \int_{\mathcal{M}} R \, \sqrt{-g} \; dt \: dx \: dy \: dz,
$$
where $k$ is an arbitrary unitless constant.  We prefer $k = \frac{1}{16 \pi}$ to recover Newton's theory in the non-relativistic limit.
A: That particular multiplicative constant $c^4/16\pi G$ in the Einstein-Hilbert gravitational action is necessary to produce the proper constants on the right side of the Einstein field equations,
$$R_{\mu\nu}-\frac12Rg_{\mu\nu}=\frac{8\pi G}{c^4}T_{\mu\nu},$$
when one varies the complete action
$$S=S_\text{EH}+S_\text{MR}$$
including a matter-and-radiation term $S_\text{MR}$ for which the Hilbert energy-momentum tensor is
$$T_{\mu\nu}=\frac{-2}{\sqrt{-g}}\frac{\delta S_\text{MR}}{\delta g^{\mu\nu}}.$$
The constants in the Einstein field equations are there to reduce to Newtonian gravitation in the weak-field limit.
The $c^4/G$ in the Einstein-Hilbert action is necessary simply on dimensional grounds to make it have the dimensions of action. But without considering how gravity couples to non-gravitational fields, one can’t explain the $1/16\pi$ in the Einstein-Hilbert action.
