Let $G$ be the simply-connected Lie group with Lie algebra $\mathfrak g$, let $B\subset G$ be the Borel subgroup, and let $X=G/B$ be the flag variety. There are equivalences $$\mathrm{Mod}_f(\mathfrak g,B,\chi_\lambda)\xrightarrow{-\otimes_{U(\mathfrak g)}D_X}\mathrm{Mod}_c(D_X,B)\xrightarrow{DR_X}\mathrm{Perv}(\mathbb C_X,B),$$ where the first equivalence is the Beilinson-Bernstein correspondence, and the second equivalence is the Riemann-Hilbert correspondence.
Note that $X$ has a stratification by $B$-orbits, indexed by the Weyl group orbits: for $w\in W$, let $X_w:=BwB/B$, of dimension $\ell(w)$. Then under the equivalence $M(w\lambda)$ corresponds to $\mathbb C_{X_w}[\ell(w)]$ and $L(w\lambda)$ corresponds to $IC(\overline X_w,\mathbb C_{X_w})$.
Moreover, Kazhdan-Lusztig "Schubert varieties and Poincaré duality" shows $$P_{y,w}(q)=\sum_{i}(\dim H^{i-\ell(w)}(IC(\overline X_w,\mathbb C_{X_w}))_{yB})q^{i/2}.$$ Here, $$ \begin{align*} H^{i-\ell(w)}(IC(\overline X_w,\mathbb C_{X_w})_{yB})&=\mathrm{RHom}_{\mathrm{Perv}(\mathbb C_X,B)}(\mathbb C_{X_y},IC(\overline X_w,\mathbb C_{X_w})[i-\ell(w)])\\ &=\mathrm{RHom}_{\mathcal O}(M(y\lambda),L(w\lambda)[i+\ell(y)-\ell(w)])\\ &=\mathrm{Ext}_{\mathcal O}^{-i-\ell(y)+\ell(w)}(M(y\lambda),L(w\lambda)). \end{align*}$$ (most of this is in Hotta-Takeuchi-Tanisaki D-modules, Perverse Sheaves, and Representation Theory.)