In the movie The Ghost Writer as soon as the Ghost leaves the Rhinehart publishing, he gets mugged by people on the bike. I couldn't figure out who caused this act in the movie or if it was in any way related to the web of deceit that the ghost would tangle himself in when he starts writing Lang's memoirs.
Well, you're right, it bears no obvious relation to the rest of the story and isn't referenced any further. So I don't know if the following suffices to satisfy you as a complete answer, let alone if we can hope for a more conclusive answer on the matter at all.
It is clear that the Lang biography is a very hot topic, as apparent from the high security measures at Rhinehart publishing and the high secrecy put around the manuscript itself. So it isn't a big stretch that quite a few people would like to get their hands on it, be they journalists or whoever, especially since Lang coincidentally also just starts to seep into the news again. So the Ghost might not be that far off when he tells Rick on the phone that
all they took was the manuscript that Sidney Kroll gave me. [...] I think they must have followed me from Rhinehart's. [...] maybe they thought I had Lang's book.
That might be all there is to it. It's unlikely that the CIA was behind this in order to know more about the manuscript, since Ruth Lang (revealed to be a CIA agent at the end) must have known that the manuscript was safely guarded in Rhinehart's villa. It could have been Rycart's men in order to get more info on Lang in their effort to bring him down, we don't know that either, however.
Yet, a few scenes later the Ghost even has a more elaborate theory, although one that isn't too fleshed-out either, namely that Kroll just gave him some random manuscript in order to lure any possible people out who might want to get their hands on the Lang manuscript:
Ghost: Listen, I just realized Sidney Kroll could have given me that manuscript deliberately so it would look like I was carrying Lang's book.
Rick: Why the hell would he do that?
Ghost: I don't know. To use me as a tethered goat?
Yet that might just be the Ghost getting a little confused or paranoid since it doesn't add up too well either. And it was probably meant as a distraction to confuse us viewers, too, and make us a little more paranoid, in a foreshadowing of the intricacies the Ghost has brought himself into. At the end of the day we just don't know who those muggers were and from a storytelling point of view it was likely just a red herring to start off his adventure under a bad sign right away and spark the exact same reaction in the viewer as in the Ghost:
I knew this whole thing was a bad idea.