Sorry to tune in so late to this conversation, but I think it's worth pointing out some of the paper trail on the question (supplementing BCnrd's comment). This goes back to Chevalley's initial work in the 1950s, especially in volume II (in French) of his projected
six volume work *Theorie des groupes de Lie*. The first volume (in English) was published by Princeton Press, then II and III followed but no more; his 1956-58 Paris seminar changed the whole approach to linear algebraic groups and largely ignored the Lie algebras. In Section 14 of II, working over an arbitrary field of characteristic 0, Chevalley asks which Lie subalgebras $\mathfrak{g} \subset \mathfrak{gl}(V)$ (with $\dim V < \infty$) can be Lie algebras of closed subgroups of the general linear group. He worked out a number of nice features of the *unique* smallest algebraic subalgebra containing $\mathfrak{g}$: it has the same derived algebra as $\mathfrak{g}$, for instance. In fact, the derived algebra of any $\mathfrak{g}$ is algebraic.

Some of these ideas were written down by Borel (Section 7) and by me (Chap. V)
in our Springer graduate texts, working over an algebraically closed field of characteristic 0 (my treatment came from the earlier Bass/Borel notes). These sources include further references to papers by Hochschild and others along with the more scheme-theoretic treatment in the 1970 book by Demazure and Gabriel: II, Section 6, no. 2. They assume $k$ is a field and $\mathfrak{G}$ is a " $k$-groupe localement algebrique" with an appropriate Lie algebra attached, then study possible algebraic subalgebras.

In prime characteristic the notion of algebraic Lie algebra becomes much more problematic. See Seligman's 1965 book *Modular Lie Algebras*, VI.2, for some
discussion. For example, the Lie algebra
$\mathfrak{sl}(p,k)$
is usually simple modulo its one-dimensional center, but the quotient algebra can't be algebraic since then it would be the Lie algebra of a known simple algebraic group. Even more extreme are the extra simple Lie algebras of "Cartan type"
(and others for small primes), for which there are no corresponding groups. `