The right of return is codified in the Universal Declaration of Human Rights and the International Covenant on Civil and Political Rights, giving any person the right to return to, and re-enter, his or her country of origin. The Palestinians have a right to the property they left as a result of the Arab-Israeli conflicts.
The right of return should be determined on a case-by-case basis, so long as the prisoner is not deemed an "enemy combatant." Israel shouldn't have to return Palestinians who are known to be possible suicide bombers or have connections to terror cells. Ordinary citizens held for questioning should be allowed to return home if they aren't charged with a crime.
In the same way that Native Americans are not permitted to simply regain their former lands in the presence of another occupying force, I do not believe that Palestinians have an inborn RIGHT to the lands that they lost. That said, I don't agree with the mechanism by which they lost their lands. The meddling of the Western world in the Middle East was driven almost entirely by the self interest of the nations involved, and the placement of Israel within Palestine was driven by strange, archaic religious dogma that has no place ruling our world today. I don't believe the Israelis have an inborn right for their space as much as I don't believe that simply having lived there once equates to Palestinians having a right to the land, however I do believe that all people deserve the right to pursue a better life for themselves, and in as much posit that the Palestinians deserve an opportunity to coexist in that land.