The babel-shorthand "= isn't activated yet when the macro is defined, so you have to activate it:
\documentclass[a4paper]{article}
\usepackage[ngerman]{babel}
\shorthandon{"}
\newcommand{\TT}{Test"=Text }
\shorthandoff{"}
\begin{document}
This is a test whether the hyphen in \TT works or not.
In normal Test"=Text works.
\end{document}

"Activated" means that it makes LaTeX think "Wait, there's something going on here, better check the next characters really carefully", just like a backslash \ tells it that a macro follows. \shorthandon{"} tells LaTeX to watch out for any ". (This only works for " afaik, it's babel specific.) Normally, " isn't activated until \begin{document}.
`to mark your inline code as I did in my edit. – doncherry Jan 7 '12 at 21:33