The reason for that error message is that, as it stands in your code, the object
$\delta(A_{\mu})$ does not have any free indices. That is because Cadabra by default 'absorbs' indices when you apply a function to a tensor. So $\delta(...)$ is seen as a function applied to $A_{\mu}$ and that has no indices.
To make $\delta(...)$ show these indices, you need to give it a property IndexInherit
(or if you want to inherit other properties, like dependence on coordinates, you may want to use the catch-all Accent
property instead).
With that, your example becomes
{\mu,\nu,\rho,\sigma}::Indices(position=free).
\partial{#}::Derivative.
\delta{#}::Accent.
FieldStrength := F_{\mu\nu} -> \partial_{\mu}{A_\nu} - \partial_{\nu}{A_\mu};
Lagrangian := L -> -(1/4)F_{\mu\nu}F^{\mu\nu};
S := \int{L}{x}:
substitute(S,Lagrangian);
substitute(S,FieldStrength);
distribute(S);
vary(S, $A_{\mu} -> \delta{A_{\mu}}$);
integrate_by_parts(S, $\delta{A_{\mu}}$);
sort_product(_);
canonicalise(_);
factor_out(S, $\delta{A^{\mu}}$);
to produce
$$- \frac{1}{4}\int \delta\left(A^{\mu}\right) \left(-4\partial^{\nu}\left(\partial_{\nu}{A_{\mu}}\right)+4\partial^{\nu}\left(\partial_{\mu}{A_{\nu}}\right)\right) {\rm d}x$$