To just patch all blocks to have an underlined title, you can add a redefinition of \insertblocktitle as \underline{\insertblocktitle} at the start of the block begin beamer template.
Edit: Similarly, for the exampleblock and alertblock environments, add the same lines to the block example begin and block alerted begin beamer templates.
MWE:
\documentclass{beamer}
\addtobeamertemplate{block begin}{%
\let\oldinsertblocktitle\insertblocktitle%
\def\insertblocktitle{\underline{\oldinsertblocktitle}}%
}{}
\addtobeamertemplate{block example begin}{%
\let\oldinsertblocktitle\insertblocktitle%
\def\insertblocktitle{\underline{\oldinsertblocktitle}}%
}{}
\addtobeamertemplate{block alerted begin}{%
\let\oldinsertblocktitle\insertblocktitle%
\def\insertblocktitle{\underline{\oldinsertblocktitle}}%
}{}
\begin{document}
\begin{frame}{My frame}
\begin{block}{My block}
has some content
\end{block}
\begin{exampleblock}{My block}
has some content
\end{exampleblock}
\begin{alertblock}{My block}
has some content
\end{alertblock}
\end{frame}
\end{document}
