Deligne's construction works as follows. He identifies the space $GL_2(\mathbb{A})/GL_2(\mathbb{Q})$ with the $\mathbb{C}$-points of the variety* $\mathcal{M}_{ell,level}$ parameterizing elliptic curves with complete level structure, or equivalently, the moduli space of elliptic curves up to isogeny with complete (in the appropriately modified sense) level structure. The latter perspective has the advantage that there's an obvious $GL_2(\mathbb{A}_f)$-action. Furthermore, this moduli perspective has the advantage that both the variety and this action are defined over $\mathbb{Q}$.

Since this action is defined over $\mathbb{Q}$, there are commuting (!) actions of $\operatorname{Gal}(\mathbb{Q})$ and $GL_2(\mathbb{A}_f)$ on the (e.g., parabolic, with coefficients in $Sym^k$ of the Tate module of the tautological elliptic curves) cohomology of $\mathcal{M}_{ell,level}$. Therefore, for a prime $p$, there are commuting actions of the Hecke algebra at $p$ on the $G(\mathbb{Z}_p)$-invariants and the Galois group. Running this over all primes over which your eigenform $f$ is unramified, you get a commuting action of a big Hecke algebra and the Galois group. Finally, $f$ determines a maximal ideal of this big Hecke algebra being an eigenform, so you can take the "$f$-isotypic" component of this cohomology.

The first theorem of Eichler and Shimura tells you that this isotypic component has dimension $2$. Then the Eichler-Shimura relation tells you that the Hecke-eigenvalues correspond to the traces of Frobenius as predicted by Langlands et al. This matching of eigenvalues/traces of Frobenius exactly means that the L-function of this modular form match the Artin L-function of the representation.

Deligne also gives a modular-type description of the action of these Hecke operators because knowing that the Hecke operators are given by correspondences (so within the world of motives) allows him to apply the Weil conjectures on how e.g. constant sheaves behave under motivic-type operations. From here he deduces the Ramanujan conjecture.

* Actually, it's somewhat better to think of it as a provariety. Then notions of compactly supported etale cohomology are actually defined, and from this perspective cohomology of $Sym^k$ of the tautological $\mathbb{Z}_{\ell}$-sheaf on this space given as the $\ell$-adic Tate module of the canonical elliptic curve (which is trivial on the variety) is not just the direct sum of $k+1$ copies of cohomology of $\mathbb{Z}_{\ell}$.