There are several ways of knowing what states should be there. For simple cases such as this, the easiest way is just by counting all the possibilities or micro-states.
Since you have 2 "equivalent" electrons in $p^2$ (equivalent meaning that they share quantum numbers $n$ and $l$, related to the energy of the system) there are
$$\left( \begin{array}{l} 6 \\ 2 \end{array} \right) = 6 \cdot 5/2 = 15$$
micro-states (possible ways of assigning $n$, $l$, $m_l$ and $m_s$ to the outer (valence) electrons. Know you have to count all the possible (allowed by Pauli's principle) different arrangements of $m_{l,1}$, $m_{l,2}$, $m_{s,1}$, $m_{s,2}$.
You can find them explicitly in any Physical Chemistry book (e.g. McQuarrie and Simon). Writing $m_{l,1}, m_{l,2}$ and $m_s$ omitted ($m_s = 1/2$) or with an over bar (for spin $m_s = -1/2$), the microstates are:
$(1,\bar{1}), (1,0),(1,\bar{0}), (1,-1),(1,-\bar{1})$, $(0,1),(0,\bar{1}), (0,\bar{0}), (0,-1),(0,-\bar{1})$, $(-1,1),(-1,\bar{1}), (-1,0),(-1,\bar{0}), (-1,-\bar{1})$
Now you have to group these states by characterising $L$ and $S$ (since, barring spin-orbit coupling, for a given $L$ and $S$ the $M_L$ and $M_S$ states form a manifold of degenerate states).
There are several ways of doing so, but I'll be sketchy to avoid lengthiness. For instance you can first think in those cases with $m_{s,1} \neq m_{s,2}$ where $m_{l,1}$ can be equal to $m_{l,2}$. Then $M_S = m_{s,1} + m_{s,2} = 0$ ($S$ can still be 1 -triplet or 0 - singlet). $M_L = m_{l,1} + m_{l,2} = 2,1,0$. So you can have states with $L = 2,1,0$. The states with $L = 2$ must be $S = 0$ since, as you realised, $m_{s,1}$ cannot be equal to $m_{s,2}$. Thus you identify 5 micro-states ($M_L = +L, \ldots, 0, \ldots -L$) corresponding to a single level $^1$D.
Of the remaining 10 states you can clearly see from the listing of micro-states that your $L=1$ level is a triplet (you can find microstates with $M_S = 1$ and $M_L = 1$ so the remaining $M_S = 0,-1$ and $M_S = 0, -1$ have to be there too). For a $^3$P level there are $3\times 3 = 9$ microstates. Finally, the remaining micro-state must correspond to a $^1$S state.
Regarding your question of the wave function. Again, think only on your last 2 electrons (it is not difficult to "enlarge" your Slater determinant with the other electrons). Each of your previous micro-states would correspond to a single Slater determinant. For example, for $(1,\bar{0})$ you would have the wave function
$$ \frac{1}{\sqrt{2}} \left| \begin{array}{cc} 2p_1(1)\alpha(1) & 2p_0(1)\beta(1) \\
2p_1(2)\alpha(2) & 2p_0(2)\beta(2) \end{array} \right|$$
where $2p_{m}$ is the wave function in atomic orbital $2p_{m}$ and $\alpha$ and $\beta$ are the spin functions. Some states belonging to the levels with well-defined $L$ and $S$ correspond directly to the micro-states. For instance $(1,\bar{1})$ is exactly $|L=2,S=0,M_L=2,M_S=0\rangle$. However, most states must be written as linear combinations of Slater determinants. For instance, to the state $|L=2,M_L=1,S=0,M_S=0\rangle$ corresponds the wave function
$$\frac{1}{2} \left| \begin{array}{cc} 2p_1(1)\alpha(1) & 2p_0(1)\beta(1) \\
2p_1(2)\alpha(2) & 2p_0(2)\beta(2) \end{array} \right| + \frac{1}{2} \left| \begin{array}{cc} 2p_0(1)\alpha(1) & 2p_1(1)\beta(1) \\
2p_0(2)\alpha(2) & 2p_1(2)\beta(2) \end{array} \right|$$
whereas for the state $|L=2,M_L=0,S=0,M_S=0\rangle$ the wave function would be
$$\frac{1}{2\sqrt{3}} \left| \begin{array}{cc} 2p_1(1)\alpha(1) & 2p_{-1}(1)\beta(1) \\
2p_1(2)\alpha(2) & 2p_{-1}(2)\beta(2) \end{array} \right| + \frac{1}{\sqrt{3}} \left| \begin{array}{cc} 2p_0(1)\alpha(1) & 2p_0(1)\beta(1) \\
2p_0(2)\alpha(2) & 2p_0(2)\beta(2) \end{array} \right| + \frac{1}{2\sqrt{3}} \left| \begin{array}{cc} 2p_{-1}(1)\alpha(1) & 2p_{1}(1)\beta(1) \\
2p_{-1}(2)\alpha(2) & 2p_{1}(2)\beta(2) \end{array} \right|$$