The first complex, from Weibel, is a projective resolution of the trivial $\mathfrak g$-module $k$ as a $\mathcal U(\mathfrak g)$-module; I am sure Weibel says so!
Your second complex is obtained from the first by applying the functor $\hom_{\mathcal U(\mathfrak g)}(\mathord-,k)$, where $k$ is the trivial $\mathfrak g$-module. It therefore computes $\mathrm{Ext}_{\mathcal U(\mathfrak g)}(k,k)$, also known as $H^\bullet(\mathfrak g,k)$, the Lie algebra cohomology of $\mathfrak g$ with trivial coefficients.
The connection with deformation theory is explained at length in Gerstenhaber, Murray; Schack, Samuel D. Algebraic cohomology and deformation theory. Deformation theory of algebras and structures and applications (Il Ciocco, 1986), 11--264, NATO Adv. Sci. Inst. Ser. C Math. Phys. Sci., 247, Kluwer Acad. Publ., Dordrecht, 1988.
In particular neither of your two complexes 'computes' deformations: you need to take the projective resolution $\mathcal U(\mathfrak g)\otimes \Lambda^\bullet \mathfrak g$, apply the functor $\hom_{\mathcal U(\mathfrak g)}(\mathord-,\mathfrak g)$, where $\mathfrak g$ is the adjoint $\mathfrak g$-module, and compute cohomology to get $H^\bullet(\mathfrak g,\mathfrak g)$, the Lie algebra cohomology with coefficients in the adjoint representation. Then $H^2(\mathfrak g,\mathfrak g)$ classifies infinitesimal deformations, $H^3(\mathfrak g,\mathfrak g)$ is the target for obstructions to extending partial deformations, and so on, exactly along the usual yoga of formal deformation theory à la Gerstenhaber.
By the way, the original paper [Chevalley, Claude; Eilenberg, Samuel
Cohomology theory of Lie groups and Lie algebras.
Trans. Amer. Math. Soc. 63, (1948). 85--124.] serves as an incredibly readable introduction
to Lie algebra cohomology.
Lie algebras are algebras over an operad, usually denoted $\mathscr{L}\mathit{ie}$. This is a quadratic operad, which happens to be Koszul. It therefore comes with a prefered cohomology theory (there is an analogue of Hochschild cohomology of algebras over a Koszul operad) which is defined in terms of a certain canonical complex —unsurprisingl called the Koszul complex. If you work out the details in this general construction, you obtain the Chevalley-Eilenberg resolution.
Alternatively, if $\mathfrak{g}$ is a Lie algebra, we can view $U(\mathfrak g)$, its enveloping algebra, as a PBW deformation of the symmetric algebra $S(\mathfrak g)$. The latter is just a polynomial ring, so we have a nice resolution for it, the Koszul complex, and there is a more or less canonical way of deforming that resolution so that it becomes a resolution for the PBW deformation. Again, working out the details rapidly shows that the deformed complex is the Chevalley-Eilenberg complex.
Finally (I haven't really checked this, but it should be true :) ) if you look at $U(\mathfrak g)$ as presented by picking a basis $B=\{X_i\}$ for $\mathbb g$ and dividing the free algebra it generates by the ideal generated by the relations $X_iX_j-X_jX_i-[X_i,X_j]$, as usual, you can construct the so called Annick resolution. Picking a sensible order for monomials in the free algebra (so that standard monomials are precisely the elements of the PBW basis of $U(\mathfrak g)$ constructed from some total ordering of $B$), this is the Chevalley-Eilenberg complex again.
These three procedures (which are of course closely interrelated!) construct the resolution you want as a special case of a general procedure. History, of course, goes in the other direction.
Best Answer
Although the germ of the idea might've appeared in Koszul's earlier work on the cohomology of Lie algebras and homogeneous spaces, it seems that the first full-fledged appearance of the Koszul complex/resolution is in Koszul, Sur un type d'algèbres différentielles en rapport avec la transgression, Colloque de topologie (espaces fibrés), Bruxelles (1950), 73–81. The primary motivation there is topological/geometric (cohomology of fiber bundles), but Koszul does give fairly abstract algebraic results and definitions. Specifically, consider a principal $G$-bundle $p\colon E\to B$, where $G$ is a compact connected Lie group. Write $x_1,\ldots,x_l$ for the primitive generators of $H^\ast(G)$, so that $H^\ast(G)=\bigwedge^l_{i=1} x_i$. Then there are $G$-invariant differential forms $\{\omega_i\}$ on $E$ whose restrictions $\{\xi_i\}$ to a fiber $G$ are bi-invariant forms that represent the classes $\{x_i\}$ and such that $d\xi_i$ is the image under $p^\ast$ of some form $c_i$ on the base $B$. The exterior algebra $\Omega^\ast(B)$ of $B$ may be viewed as a module over the polynomial ring $A=\mathbb R[c_1,\ldots,c_l]$. Koszul is led to the "Koszul complex" $$ {\textstyle \bigwedge_{i=1}^l} x_i \otimes \Omega^\ast(B) $$ (with the appropriate differential) through topological considerations: he notes that in certain cases (for nice enough $B$), one can replace $\Omega^\ast(B)$ above with $H^\ast(B)$ and then the resulting complex $\bigwedge x_i \otimes H^\ast(B)= H^\ast(G) \otimes H^\ast(B)$ computes the cohomology of $E$.
Koszul takes a look at the general properties of "Koszul complexes" of the form $E \otimes M$ where $E=\bigwedge_{i=1}^l x_i$ and $M$ is a module over $A=k[x_1,\ldots,x_l]$, and calls the resulting cohomology $H^\ast(M)$ the cohomology of the $A$-module $M$. He proceeds to use this machinery to give a generalization of Hilbert's syzygy theorem. This is, e.g., the context in which the Koszul complex arises in Cartan & Eilenberg's book on homological algebra (see Ch. VIII, sections 4 and 6)---and this is probably (?) the first textbook appearance of the construction.
See also A. Haefliger, Des espaces homogènes à la résolution de Koszul, Ann. Inst. Fourier 37(4) (1987), 5–13, for some interesting historical commentary on Koszul's work.