Question: On the Moduli space $\overline{M}\_{g}$ of genus $g$ stable curves the *Hodge class* $\lambda$ induces a birational morphism $f$ on a projective variety contracting the boundary, that is the exceptional locus of $f$ coincides with the boundary of the moduli space.

**Is there a line bundle $L$ on the moduli space of pointed curves (as instance on $\overline{M}\_{2,1}$ and on the moduli space of $2$-pointed elliptic curves) with the same property (i.e. a line bundle which induces a birational morphism whose exceptional locus coincides with the boundary) ?**

Answer: 
A detailed description of the nef cones of the examples you mention is given in the thesis of William Rulla (The birational geometry of $\overline{M}\_3$ and $\overline{M}\_{2,1}$, The University of Texas at Austin, 2001.) From this, it follows that there are no such line bundles for the two examples that you mention. I would guess that the same holds in general as well.
The Hodge class $\lambda\_{2,1}$ on $\overline{M}\_{2,1}$ 

is the pull-back of the Hodge class $\lambda$ on $\overline{M}\_{2}$ via the forgetful morphism

$$\pi:\overline{M}\_{2,1}\rightarrow\overline{M}\_2,$$

that is $\lambda\_{2,1} = \pi^{\*}\lambda$. 

**So $\lambda\_{1,2}$ is nef but not big on $\overline{M}\_{2,1}$.**