Suppose that the center $c_k,k=1,\ldots,n$ of the small circles are placed equidistantly on the bigger circle.
Then we have $c_k=\left(R\sin(2\pi\frac{k}{n}),R\cos(2\pi\frac{k}{n})\right), k = 1,\ldots,n$. So for $k=1,\ldots,n$ we must have $r=\frac{\|c_{k}-c_{k+1}\|_2}{2}$, since two circles with same radius are tangent if their radius is the half of the distance between their centers. In particular $$r=\frac{\|c_{n-1}-c_{n}\|_2}{2}=\frac{1}{2}\sqrt{\big(R\sin(2\pi)-R\sin\big(2\pi\frac{n-1}{n}\big)\big)^2+\big(R\cos(2\pi)-R\cos\big(2\pi\frac{n-1}{n}\big)\big)^2} \\ =\frac{R}{2}\sqrt{\sin\big(2\pi\frac{n-1}{n}\big)^2+\big(1-\cos\big(2\pi\frac{n-1}{n}\big)\big)^2} \\ = \frac{R}{2}\sqrt{2-2\cos\big(2\pi\frac{n-1}{n}\big)} =\frac{R}{2}\sqrt{2\Big(1-\cos\big(2\pi\frac{n-1}{n}\big)\Big)}\\
=\frac{R}{2}\sqrt{4\sin\big(2\pi\frac{n-1}{n}\big)^2}=R\sin\big(\pi\frac{n-1}{n}\big)=R\sin\big(\frac{\pi}{n}\big).$$