The most practical way is to exploit etoolbox's utilities:
\preto\foo{\hspace{1em}}
\appto\foo{\hspace{1em}}
The problem arises for commands with "apparent arguments", for example \section. If you look at the output of \show\section, you'll see that it has no argument whatsoever. It's a technique frequently employed in LaTeX, because it's more efficient. Actually \section is transformed into
\@startsection{...}{...}{...}{...}{...}
and \@startsection has six arguments; you see that \section supplied the first five, the sixth is what comes after \section (there's more to this, because there can be a * or an optional argument, but let's keep it simple).
Using the trick with \appto for a command like \section would result in a disaster, because the thing added will provide the sixth argument for \@startsection, which is clearly not what is wanted.
As Herbert says, you can use \preto and \appto also for environments, using \foo and \endfoo if the environment is foo, provided the environment has no argument. If the argument is part of the command (i.e. it is not "apparent") one can use \pretocmd and \apptocmd; if the argument is apparent (it's the case of \tabular, for example) \appto and \apptocmd must not be used, but \preto and \pretocmd are quite safe.