It is probably overkill, but I usually use siunitx. Here is an example
\documentclass{article}
\usepackage{siunitx}
\sisetup{
group-four-digits = true,
group-separator = {,}
}
\begin{document}
I looked in my bank account and saw \SI{15}[\$]{M}!
But then I woke up, and there was only \SI{457.34}[\$]{}.
I cried a little, but then I got paid and there was \SI{2456.23}[\$]{}.
\end{document}

This shows a compact way of writing large numbers (the $15M), the typesetting of normal amounts ($457.34) and the way siunitx will sort out where to put the commas (in the $2,456.23).
Depending on the font you use, you might want to put in the $\,$, if it looks too cramped to you. In the above example, I probably would. But it is easy to define a macro to wrap that in:
\newcommand{\usd}[1]{\SI{#1}[\$\ensuremath{\,}]{}}
UPDATE: I based on the comments, I should add that in the US, the SI standard of using a thin space to group triplets is not well followed. For me, it is certainly preferable to follow the standard, but consider your audience. If you can get away with it, use group-separator = {\,}.