In the "comments" section of a previous post, Bassam said that just because two texts contain the same stories, it doesn't mean that one writer copied from other sources. Bassam is correct that similarity doesn't absolutely prove copying. However, the evidence may certainly point in that direction. For instance, if a teenager hands in a paper to a teacher that is remarkably similar to that of another student, the teacher will infer copying based on the extent of the similarity.
If Muhammad were truly a prophet, then the angel Gabriel may indeed have revealed stories that are found in earlier sources. But a problem arises when some of the sources contain apparently fictional material. That is, if we have good reasons for thinking that a story was invented by a creative writer in the second or fifth century, and then we find the same story in the Qur'an, this strongly implies that Muhammad incorporated a fictional tale into the Qur'an.
Muslims, of course, will say that the story is true, and that the earlier source reporting the same story is correct. While this is possible, it requires a tremendous leap of faith on the part of Muslims. As the following video shows, the problem for Muslims who want to defend Muhammad is quite severe: