Without loss of generality we can assume that the support of the measure equals $X$
(i.e., the measure is faithful),
because we can always pass to the subspace defined by the support of the measure.
The space $𝐋^2(X)$ is independent of the choice of a faithful measure and depends only
on the underlying enhanced measurable space of $X$, i.e., measurable and negligible subsets of $X$.
Maharam's theorem provides a complete classification of measurable spaces up to isomorphism.
Every measurable space canonically splits as a disjoint union of its
ergodic subspaces, i.e., measurable spaces that do not admit measures
invariant under all automorphisms.
Ergodic measurable spaces in their turn can be characterized using
two cardinal invariants $(m,n)$, where either $m=0$ or both $m≥ℵ_0$ and $n≥ℵ_0$.
The measurable space represented by $(m,n)$ is the disjoint
union of $n$ copies of $2^m$, where $2=\{0,1\}$ is a measurable
space consisting of two atoms and $2^m$ denotes the product of $m$ copies of 2.
The case $m=0$ gives atomic measurable spaces (disjoint unions of points),
whereas $m=ℵ_0$ gives disjoint unions of real lines (alias standard Borel spaces).
Thus isomorphism classes of measurable spaces are in bijection
with functions M: Card'→Card, where Card denotes the class of cardinals
and Card' denotes the subclass of Card consisting of infinite cardinals and 0.
Additionally, if $m>0$, then $M(m)$ must belong to Card'.
The Banach space $𝐋^p(X)$ ($1≤p<∞$) is separable if and only if
$M(0)$ and $M(ℵ_0)$ are at most countable and $M(m)=0$ for other $m$.
Thus there are two families of measurable spaces whose $𝐋^p$-spaces are separable:
- Finite or countable disjoint unions of points;
- The disjoint union of the above and the standard Borel space.
Equivalent reformulations of the above condition assuming $M(m)=0$ for $m>ℵ_0$:
- $𝐋^p(X)$ is separable if and only if $X$ admits a faithful finite measure.
- $𝐋^p(X)$ is separable if and only if $X$ admits a faithful $σ$-finite measure.
- $𝐋^p(X)$ is separable if and only if every (semifinite) measure on $X$ is $σ$-finite.
The underlying measurable space of a locally compact group $G$ satisfies the above conditions if and only if $G$ is second countable as a topological space.
The underlying measurable space of a paracompact Hausdorff smooth manifold $M$
satisfies the above conditions if and only if $M$ is second countable, i.e.,
the number of its connected components is finite or countable.
More information on this subject can be found in this answer:
Is there an introduction to probability theory from a structuralist/categorical perspective?
Bruckner, Bruckner, and Thomson discuss separability of $𝐋^p$-spaces in Section 13.4 of their textbook Real Analysis:
http://classicalrealanalysis.info/documents/BBT-AlllChapters-Landscape.pdf