Concept:
Convert the given limit into a Riemann sum.
If
\[
\lim_{n\to\infty}
\frac1n
\sum_{r=1}^{n}
f\!\left(\frac{r}{n}\right),
\]
then
\[
=
\int_0^1 f(x)\,dx.
\]
Step 1: Rewrite the given sum.
\[
L
=
\lim_{n\to\infty}
\frac1n
\sum_{r=1}^{n}
\tan^2\left(\frac{r\pi}{4n}\right).
\]
Let
\[
f(x)=\tan^2\left(\frac{\pi x}{4}\right).
\]
Then
\[
L
=
\int_0^1
\tan^2\left(\frac{\pi x}{4}\right)\,dx.
\]
Step 2: Evaluate the integral.
Put
\[
t=\frac{\pi x}{4}.
\]
Then
\[
dx=\frac{4}{\pi}\,dt.
\]
When
\[
x=0,\quad t=0,
\]
and when
\[
x=1,\quad t=\frac{\pi}{4}.
\]
Therefore,
\[
L
=
\frac{4}{\pi}
\int_0^{\pi/4}
\tan^2 t\,dt.
\]
Using
\[
\tan^2 t=\sec^2 t-1,
\]
\[
L
=
\frac{4}{\pi}
\int_0^{\pi/4}
(\sec^2 t-1)\,dt.
\]
\[
=
\frac{4}{\pi}
\Big[\tan t-t\Big]_0^{\pi/4}.
\]
\[
=
\frac{4}{\pi}
\left(
1-\frac{\pi}{4}
\right).
\]
\[
=
\frac{4-\pi}{\pi}.
\]
Therefore,
\[
\boxed{
\lim_{n\to\infty}\frac{1}{n}
\left[
\tan^2\frac{\pi}{4n}
+\tan^2\frac{2\pi}{4n}
+\cdots+
\tan^2\frac{n\pi}{4n}
\right]
=
\frac{4-\pi}{\pi}
}
\]
\[
\boxed{\text{Answer = (D)}}
\]