If you want to add a space in an expandable way, which is required for \write18 system calls you can do so using the \space macro which is defined like \newcommand*{\space}{ } (actually \def\space{ }) and therefore expands to a single space.
So you can write your command string like:
bash -c "\myCommand\space -Tpdf #2.dot > #2.pdf"
The explicit space is required because spaces after a macro are removed, because they are taken as separator between the macro name and the text afterwards.
The usual way to add {} after it would preserve the space behind it, but this is only good for typesetting the text where the braces are ignored. If you want the text in an expandable context, like to write it into an external (auxiliary) file, to the shell (like in this case) or build a macro name from it (advanced topic), then the {} are unwanted and usually cause trouble.
\myCommand{}would work fine. – Joseph Wright♦ Feb 17 '12 at 16:35\myCommand\spaceshould work; but you should add some context to your question – egreg Feb 17 '12 at 16:35\write18, if I understand correctly, so neither{}nor\xspaceis the solution. – egreg Feb 17 '12 at 16:48