Welcome to the wonderful world of transliteration!
Every language has an alphabet; some languages, like French and Spanish, use different accent and diacritical marks from English, but others, like Hebrew and Chinese, use a different set of characters altogether. (The always helpful Wikipedia has a nice rundown, if you'd like an overview.)
If you're working at an academic press, dealing with these contradictory alphabets is generally straightforward: Your press will have an acceptable system of transliteration, and that's what you should use (unless, of course, the author has his or her own system they insist on, in which case you'll have a headache on your hands, but that's another story). In fandom, of course, things are a bit different.
We'll take two examples, both from Japanese fandom:
Hellsing. Hellsing is notorious in American fandom for the official anime translation, which transliterated one of the lead character's names as "Arucard."
Japanese has a few sounds that correspond imperfectly to American letters. One of them is not quite an r and not quite an l, and gets translated usually as one or the the other. In the case of Hellsing, the translator chose an "R." Sounds pretty legitimate until you realize a few things:
Those of you playing at home should now take the character's name and spell it backward. Oh. Oops!
Death Note. Death Note had something of the opposite problem, of translators being a bit too accurate. Japanese names always have vowel sounds at the end-- if someone's name is, say, "Ed," a Japanese speaker will add a vowel to the end to make it into a proper name. (In Fullmetal Alchemist, for example, one character's name-- "Ed"-- is "Edo.") So when the fan translators first took on the manga, they took the lead character's name as written-- "Raito"-- while taking something of a gamble on the l/r debate. The problem was that the character's name was actually "Light," the English word. (The creator has something of a reputation for unusual names, which was well-earned during the course of the manga.)
So what's a conscientious writer to do?
The easiest approach is to find a source that's of good quality and consistent and use it. Usually, though not always, that's an official, professional translation-- fan translations are often quite good but it's much harder to find consistency. (And, as the Hellsing example above shows, official translations are not always right.) Often both transliterations are correct-- Mohammed and Muhammed is only one example, but no one wants to see an author switch back and forth mid-fic. It's confusing!
But once you've found a system or source that works for you, it's not too bad. Just be consistent and as accurate as you can be, and everyone will generally bear with you.
If you want to get a better handle on the topic and challenges involved, you might find these links interesting:
Transliteration of Hebrew letters in the Bible, which also notes that ancient Hebrew has an additional challenge for translators: no vowels. Biblical scholarship is not for the squeamish.
A visual representation of Qu'ranic transliteration.
And here's a blog post about the challenges faced by those doing the heavy lifting of translation/transliteration.