Updated
Method 1: using intersections library
Here's an approach that uses pgfplots to plot the actual Morse potential. It uses \pgfmathdeclarefunction to define a potential function V and another function that calculates the energy of the nth bound state, then uses the tikz library intersections to calculate the intersection of an undrawn horizontal line at this height with the Morse potential. Finally, it draws the horizontal line from one intersection to the next. See pgfplots: using path names created with foreach in pgfplotsextra for info on naming paths within pgfplotsinvokeforeach.
\documentclass{standalone}
\usepackage{pgfplots}
\usetikzlibrary{intersections}
\begin{document}
%%%%%%% Define Potential Function %%%%%%%
\pgfmathsetmacro{\De}{10}
\pgfmathsetmacro{\re}{1}
\pgfmathsetmacro{\a}{1}
\pgfmathdeclarefunction{V}{1}{%
\pgfmathparse{%
\De*((1-exp(-\a*(#1-\re)))^2-1)
}%
}
%%%%%%% Energy Levels %%%%%%%
% energies are given as multiples of \hbar \omega_0 with
% \omega_0 = \a*sqrt(2*\De/\m), where m is the (reduced) mass of the diatomic molecule
% \De above is really \De/(\hbar*\omega)
\pgfmathdeclarefunction{energy}{1}{%
\pgfmathparse{%
-\De+(#1+0.5) - (#1+0.5)^2/(4*\De)
}%
}
\begin{tikzpicture}
\begin{axis}[axis lines = middle,smooth,xlabel = $r/r_e$, ylabel =$E/\hbar \omega_0$, minor tick num =1, grid=none, no markers, every axis x label/.style={ at={(ticklabel* cs:1.05)}, anchor=west},
every axis y label/.style={at={(ticklabel* cs:1.05)},anchor=south},domain=0:10, enlargelimits = true,scale=1.5]
\addplot +[thick, samples=50, name path global=MorseCurve] {V(x)};
\pgfplotsinvokeforeach{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17}{
\path [name path global=HelperLine-#1] (axis cs: 0,{energy(#1)}) -- (axis cs: 10, {energy(#1)});
\draw[name intersections={of=MorseCurve and HelperLine-#1}] (intersection-1) -- (intersection-2);
}
\end{axis}
\end{tikzpicture}
\end{document}

Method 2: analytical form of the intersections
Uses the analytical form of the intersections, which is fairly easy to calculate. This is my original post, except I changed \edefs to pgfplotsinvokeforeach.
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
%%%%%%% Define Potential Function %%%%%%%
\pgfmathsetmacro{\De}{10}
\pgfmathsetmacro{\re}{1}
\pgfmathsetmacro{\a}{1}
\pgfmathdeclarefunction{V}{1}{%
\pgfmathparse{%
\De*((1-exp(-\a*(#1-\re)))^2-1)
}%
}
%%%%%%% Energy Levels %%%%%%%
% energies are given as multiples of \hbar \omega_0 with
% \omega_0 = \a*sqrt(2*\De/\m), where m is the (reduced) mass of the diatomic molecule
% \De above is really \De/(\hbar*\omega)
\pgfmathdeclarefunction{energy}{1}{%
\pgfmathparse{%
-\De+(#1+0.5) - (#1+0.5)^2/(4*\De)
}%
}
%Upper limit on classical bound state of a given energy
\pgfmathdeclarefunction{rmax}{1}{%
\pgfmathparse{%
(\a*\re+ln( - (\De+sqrt(\De*(#1+\De)))/#1 ) )/\a
}%
}
%Lower limit on classical bound state of a given energy
\pgfmathdeclarefunction{rmin}{1}{%
\pgfmathparse{%
(\a*\re+ln( (-\De+sqrt(\De*(#1+\De)))/#1 ) )/\a
}%
}
\begin{tikzpicture}
\begin{axis}[axis lines = middle,smooth,xlabel = $r/r_e$, ylabel =$E/\hbar \omega_0$, minor tick num =1, grid=none, no markers, every axis x label/.style={ at={(ticklabel* cs:1.05)}, anchor=west},
every axis y label/.style={at={(ticklabel* cs:1.05)},anchor=south},domain=0:10, enlargelimits = true,scale=1.5]
% \foreach inside axis environment was tricky, see https://tex.stackexchange.com/questions/17638/pgfplots-foreach-equivalent-to-tikzs-with-multiple-variables-separated-by-a-sla/17817#17817
\pgfplotsinvokeforeach{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17}{
\draw (axis cs: {rmin( energy(#1) )},{energy(#1)}) -- (axis cs: {rmax(energy(#1))},{energy(#1)});
}
\addplot +[thick, samples=50] {V(x)};
\node[style ={ align=center}] at (axis cs: 7,14) {Morse potential: \\ $V(r) = D_e \left( [1-e^{-a(r-r_e)}]^2-1 \right)$ };
\node[style ={ align=center}] at (axis cs: 7,7) {Energy levels: \\ $E_n = -D_e + \hbar \omega_0 (n+1/2) + \frac{[\hbar \omega_0 (n+1/2)]^2}{4 D_e} $ \\ with $\omega_0 = a \sqrt{2 D_e/m}$ };
\end{axis}
\end{tikzpicture}
\end{document}
