Atomic and elementary diagram of an $\mathcal L$-structure 
Definition. Suppose that $\mathcal M$ is an $\mathcal L$-structure. Let $\mathcal L_M$ be the language where we add to $\mathcal L$ constant symbols $m$ for each element of $M$.
The atomic diagram of $\mathcal M$ is $$\{\phi(m_1,\dots,m_n): \phi \text{ is either an atomic } \\ \text{ $\mathcal L$-formula or the negation of an atomic $\mathcal L$-formula and $\mathcal M\models \phi(m_1,\dots,m_n)$}\}.$$
The elementary diagram of $\mathcal M$ is $\{\phi(m_1,\dots,m_n): M\models \phi(m_1,\dots,m_n),\phi \text{ is an $\mathcal L$-formula}\}$.
We let $\operatorname{Diag}(\mathcal M)$ and $\operatorname{Diag_{el}}(\mathcal M)$ denote the atomic and elementary atomic diagrams of $\mathcal M$, respectively.

Is the language $\mathcal L_M$ used somehow in these definitions? If so, how exactly? I don't see it.
Also, all these definitions look completely unmotivated and incomprehensible.   What does lie behind these definitions? Is there something one can say in order to make them more plausible? Otherwise for me they look like a set of words, which I cannot make sense of.
 A: Yes, the language $\mathcal{L}_M$ is used in writing down $\phi(m_1,\dots,m_n)$. 
That is, if $\phi(x_1,\dots,x_n)$ is an $\mathcal{L}$-formula, it can't refer to elements of $M$ (except those named by constants). To express the fact that $\varphi$ is true of the tuple $(m_1,\dots,m_n)$ from $M$, let's add a constant symbol called $m_i$ for all $1\leq i \leq n$ and interpret $m_i$ in $M$ in the obvious way, namely as the element $m_i$. Now $\phi(m_1,\dots,m_n)$ is a sentence in the new, larger language. Formally, it's the sentence you get by substituting the constant symbol $m_i$ for the variable $x_i$ in $\phi(x_1,\dots,x_n)$. 
If you add constant symbols in this way for every element of $M$, you can now write down all the first-order truths about tuples from $M$. This set of $L_M$-sentences is the elementary diagram of $M$. If you restrict your attention to atomic and negated atomic formulas, you get the atomic diagram of $M$. 
For example, in the ring $\mathbb{R}$, $\pi^2 \neq e$ is a negated atomic $\mathcal{L}_{\mathbb{R}}$-sentence. There is no sentence in the language of rings which asserts that $\pi$ is not the square root of $e$. There's just no way to talk about these real numbers in the language of rings. 
As for the motivation, the definition is preceded (this is from Marker's Model Theory: An Introduction, p. 44) by the sentence "Next we give a way to construct embeddings and elementary embeddings." 
Ok, so the definition is supposed to be motivated by a desire to construct embeddings. After reading the definition, you might naturally wonder what it has to do with constructing embeddings. 
Fortunately, this is answered by the very next lemma, which says that if $N\models \text{Diag}(M)$, then there is an $\mathcal{L}$-embedding $M\to N$, and if $N\models \text{Diag}_{\text{el}}(M)$, then there is an elementary embedding $M\to N$. 
