Assuming you're not using any packages redefining \cite & friends, here's a solution. (Andrey Vihrov's comments about \mboxes and \sloppy still apply.)
\documentclass[11pt]{article}
\makeatletter
% \def\@cite#1#2{[{#1\if@tempswa , #2\fi}]}% OLD
\def\@cite#1#2{[{#1\if@tempswa ,~#2\fi}]}% NEW
\makeatother
\begin{document}
Some text that is just long enough to create an unwanted line break \cite[p.~99]{test}.
\begin{thebibliography}{9}
\bibitem{test} A bibitem.
\end{thebibliography}
\end{document}
EDIT: Replaced \penalty\@m\ with ~ in the definition of \@cite.
\citecommand in an\mbox. – Andrey Vihrov May 13 '11 at 8:52\sloppyis often necessary as it tends to exceed the margin. – Harold Cavendish May 13 '11 at 8:56\sloppyI would advise changing the text (adding, deleting or swapping a word or two) so that TeX does not issue warnings. – Andrey Vihrov May 13 '11 at 8:59