eq is not an equation. Try eq == 0 inside NDSolve
In[16]:= Remove[L, g, M, Lagrange, T, V, eq, sol]
x = L*Sin[\[Theta][t]];
y = -L*Cos[\[Theta][t]];
x' = D[x, t];
y' = D[y, t];
T = M/2*(x' + y')^2;
V = M*g*y;
Lagrange = T - V;
eq = D[D[Lagrange, \[Theta]'], t] - D[Lagrange, \[Theta]];
L = 1;
M = 1;
g = 9.81;
sol = NDSolve[{eq == 0, \[Theta][0] == Pi, \[Theta]'[0] ==
0}, \[Theta], {t, 0, 10}]
Out[28]= {{\[Theta] ->
InterpolatingFunction[{{0., 10.}}, {
5, 7, 2, {13}, {4}, 0, 0, 0, 0, Automatic, {}, {}, False}, {{0.,
0.0010264848819015065`, 0.002052969763803013, 1.002052969763803,
2.002052969763803, 3.002052969763803, 4.0020529697638025`,
5.0020529697638025`, 6.0020529697638025`, 7.0020529697638025`,
8.002052969763803, 9.001026484881901, 10.}}, {
Developer`PackedArrayForm, {0, 3, 6, 9, 12, 15, 18, 21, 24, 27,
30, 33, 36, 39}, CompressedData["
1:eJxTTMoPSmVkYGBQB2IJXZeQ34qcDgxoYFQcvzgAI98fLA==
"]}, {Automatic}]}}