As Ben points out, Kostant's papers are a fundamental reference for transition between Bott's work (Annals of Mathematics 66, 1957) involving the flag variety and a more algebraic formulation involving Lie algebra cohomology for the nilradical $\mathfrak{n}$ of a Borel subalgebra. I think the rough intuition here is that for a suitable assignment of positive or negative roots, $\mathfrak{n}$ approximates the flag variety in the classical finite dimensional representation theory setting.
Yet another viewpoint was offered in the 1970s by Bernstein-Gelfand-Gelfand in the context of category $\mathcal{O}$. (For a fairly short treatment of some of these connections see Chapter 6 of my 2008 AMS book GSM 94 where Delorme's formulation in terms of relative Lie algebra cohomology is outlined.) The relative Lie algebra technology was further developed by Borel and Wallach in their monograph (AMS, 2000).
P.S. To clarify the "relative" aspect of the cohomology here, my understanding (probably incomplete) is that in the narrow setting of finite dimensional representations of a semisimple $\mathfrak{g}$, the essential relative Lie algebra cohomology computations involve the pair $(\mathfrak{g},\mathfrak{h})$; here $\mathfrak{h}$ is a Cartan subalgebra lying in $\mathfrak{b}$. But in more sophisticated study of unitary representations of a corresponding noncompact Lie group, with a maximal compact subgroup $K$, the appropriate relative cohomology arises from Harish-Chandra's $(\mathfrak{g}, K)$-modules.