As others have noted, Robinson Crusoe functions as a religious allegory, but perhaps it functions more interestingly from a modern perspective as an allegory for colonialism, with Crusoe as the representative or allegorical European "master" and Friday as the representative "good savage."
When Crusoe shipwrecks on an island, like a proper European colonialist he immediately lays claim to it as his domain. He sees it, as European colonialists saw the "New World," as a resource base to be exploited for his own purposes. When he does encounter a native in the form of Friday, he understands Friday (the colonialist assuming the right to impose a name on the "savage") as a lesser human, a "primitive," there to serve his needs and to be guided by Crusoe's "superior" white beliefs and ideology. Friday becomes Crusoe's servant, never his equal, and Friday's imperfect command of English becomes a symbol of his inferiority. Friday fulfills the white European fantasy of how a native should think and behave, adopting the ideology of the master:
‘You do great deal much good,’ says he; ‘you teach wild mans be good, sober, tame mans; you tell them know God, pray God, and live new life.’ ‘Alas, Friday!’ says I, ‘thou knowest not what thou sayest; I am but an ignorant man Robinson Crusoe myself.’ ‘Yes, yes,’ says he, ‘you teachee me good, you teachee them good.’
When native "cannibals" arrive on the beach of "his" domain, Crusoe uses his superior technology to frighten and intimidate them with his musket. Natives are given pejorative labels and driven off, with no thought that they might have rights to what the white man has staked out as his domain. They are "cannibals" and "savages" who deserve to die. In Robinson Crusoe, we may be said to have colonialism in microcosm.