Where 2 comes from in formula for Schwarzschild radius? In general theory of relativity I've seen several times this factor:
$$(1-\frac{2GM}{rc^2}),$$
e.g. in the Schwarzschild metric for a black hole, but I still don't know in this factor where 2 comes from?
 A: A couple of preliminaries:
(1) The Schwarzschild metric is not just the metric for a black hole. It's the exterior metric for any spherically symmetric, nonrotating gravitating body. For example, it's a very good approximation to the earth's metric, since the earth is nearly spherical and is not rotating at relativistic speeds.
(2) Let's take units with $G=1$ and $c=1$.
So the question to be answered is why, in a field such as the earth's, the time-time component of the metric $g_{tt}=1-2M/r$, expressed in Schwarzschild coordinates, has the factor of 2 in it. Because the 2 is present even in the weak-field case, we can appeal to the weak-field case to explain it. In the weak-field case, the Schwarzschild $r$ coordinate just means what we naively expect it to mean.
In any static gravitational field, the metric can be written in a form where $g_{tt}=e^{2\Phi}$, where $\Phi$ is the gravitational potential. The interpretation is that for a clock at rest (relative to the preferred frame of the static field), the proper time $s$ can be found from $ds^2=e^{2\Phi} dt^2$. (This is with the +--- metric.) This simply means that there is a gravitational time dilation factor of $e^\Phi$. This time dilation factor can be found from standard arguments about elevators and the equivalence principle. The factor of 2 is present because the metric relates the squares of coordinate changes to the square of the change in proper time.
For the weak-field limit of the Schwarzschild case, we have $\Phi=-M/r$, so $g_{tt}=e^{2\Phi}=1-2M/r+\ldots$, where ... represents higher-order terms that are negligible in the weak-field case. This explains why the 2 is present in the weak-field case.
The question didn't ask for a complete derivation of the Schwarzschild metric, and it's not necessary to rederive the metric in order to suss out the reason for the 2. An explanation of the 2 in the weak-field case also constitutes an explanation of the 2 in the strong-field case. Given the form of the strong-field case, the 2 has to be there so that the weak-field behavior is recovered at large distances.
A: On the one hand, for nonrelativistic particle moving in an external
gravitational field, the Lagrangian has the form:
$$
L=-mc^{2}+\frac{m\mathbf{v}^{2}}{2}-m\phi,\quad\quad(1)
$$
where $m$ is a mass of particle, $\phi$ is a gravitational potential. On the
other hand, general relativity requires the following action for the particle:
$$
S=-mc\int ds,\quad\quad\left(  2\right)
$$
where
$$
ds^{2}=g_{\mu\nu}dx^{\mu}dx^{\nu},\quad dx^{\mu}=\left(  cdt,d\mathbf{r}
\right)  ,
$$
thus for a static field ($g_{i0}=0$)
$$
ds^{2}=g_{00}c^{2}dt^{2}+g_{ij}dr^{i}dr^{j}=\left(  g_{00}c^{2}+g_{ij}
v^{i}v^{j}\right)  dt^{2}.
$$
Let's find the leading correction to the metric in the nonrelativistic limit,
i.e., in the $c\rightarrow\infty$ limit:
$$
g_{00}=1+h_{00}+O\left(  c^{-4}\right)  ,\quad g_{ij}=-\delta_{ij}+O\left(
c^{-4}\right)  ,
$$
so that $h_{00}=O\left(  c^{-2}\right)  $, hence
\begin{align*}
ds  & =dt\sqrt{g_{00}c^{2}+g_{ij}v^{i}v^{j}}=cdt\sqrt{1+h_{00}-\mathbf{v}
^{2}/c^{2}+O\left(  c^{-4}\right)  }\quad\quad\quad\left(  3\right)  \\
& =cdt\left(  1+h_{00}/2-\mathbf{v}^{2}/2c^{2}+O\left(  c^{-4}\right)
\right)  .
\end{align*}
Using the action (2) we obtain the following Lagrangian:
$$
S=\int Ldt=\int dt\left(  -mc^{2}-mc^{2}h_{00}/2+m\mathbf{v}^{2}/2+O\left(
c^{-4}\right)  \right)  .
$$
Comparison with the Lagrangian (1) yields:
$$
\frac{c^{2}h_{00}}{2}=\phi,\quad\Rightarrow\quad h_{00}=\frac{2\phi}{c^{2}
}=-\frac{2GM}{c^{2}r}.\quad\quad\left(  4\right)
$$
Hence, one can see that the factor $2$ appears due to the square root
operation in the interval (3).
It is worth noting here that it is not directly connected with the metric
singular points. The expansion (4) is so called gauge independent, but the
position of singularity is not. For example, the expression of the
Schwarzschild metric in the harmonic coordinates has the form:(see, e.g., S.
Weinberg, Gravitation and Cosmology, eq. (8.2.15)):
$$
ds^{2}=\frac{1-GM/rc^{2}}{1+GM/rc^{2}}c^{2}dt^{2}-\frac{1+GM/rc^{2}
}{1-GM/rc^{2}}\,\frac{G^{2}M^{2}}{r^{4}c^{4}}\left(  \mathbf{r}\cdot
d\mathbf{r}\right)  ^{2}-\left(  1+\frac{GM}{rc^{2}}\right)  ^{2}
d\mathbf{r}^{2},
$$
which has the singularities in the points:
$$
r=\pm\frac{GM}{c^{2}}.
$$
However the expansion always has the form of eq. (4):
$$
g_{00}=\frac{1-GM/rc^{2}}{1+GM/rc^{2}}=1-\frac{2GM}{rc^{2}}+O\left(
c^{-4}\right)  .
$$
The Schwarzschild gauge is the simplest gauge such that $g_{00}$ has
exactly the form of the expansion (4):
$$
g_{00}=1-\frac{2GM}{rc^{2}}.
$$
$$
$$
A: The metric will diverge at the black hole horizon radius $r=r_S$, so $g_{00}$ will contain a term with a positive power of something proportional to $\frac{1}{r-r_S}$.

Heuristically, $r_S$ is the radius where the gravitational potential at that point, 
$$\phi(r)|_{r=r_S}=-\frac{m M G}{r_S},$$ 
is strong enought to even pull in an object with lightspeed $\text{lim}_{v\rightarrow c}$. That is
$$\frac{m M G}{r_S}\overset{!}{=}\frac{mc^2}{2},$$
or 
$$r_S=\frac{2MG}{c^2}.$$

More rigorously, you match the metric derived via the Einstein equations with the established Newtonian force (weak field approximation). There, the factor 2 will most likely apprear in a series expansion. See also http://en.wikipedia.org/wiki/Deriving_the_Schwarzschild_solution.
