The problem is that you cannot enclose the alignment point & within the \underline. Quick fix: overprint the line first.
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{flalign}
\mathrlap{\underline{\phantom{t=10}}}t&=10 \
t &= 10
\end{flalign}
\end{document}

mathtools is an extension to amsmath (which is automatically loaded) and provides \mathrlap. You can obtain the same without mathtools with e.g.
\begin{flalign*}
\makebox[0pt][l]{\underline{$\phantom{t=10}$}}t&=10 \\
t &= 10
\end{flalign*}
or (more plain TeX)
\begin{flalign*}
\rlap{\underline{$\phantom{t=10}$}}t&=10 \\
t &= 10
\end{flalign*}
but I find the code hard to read. Furthermore, \mathrlap will always use the correct math style; not an issue in this specific case but it will be if you try to underline more complicated expressions.
Other ways are shown in Underlining an equation in an align block.