Yes, that is what the weapon special quality grapple does:
On a successful critical hit with a weapon of this type, you can grapple the target of the attack. The wielder can then attempt a combat maneuver check to grapple his opponent as a free action. This grapple attempt does not provoke an attack of opportunity from the creature you are attempting to grapple if that creature is not threatening you. While you grapple the target with a grappling weapon, you can only move or damage the creature on your turn. You are still considered grappled, though you do not have to be adjacent to the creature to continue the grapple. If you move far enough away to be out of the weapon’s reach, you end the grapple with that action. (Source: D20PFSRD)
This says the weapon will give you a free CMB check to attempt to grapple on a critical hit.
... If you successfully grapple a creature that is not adjacent to you, move that creature to an adjacent open space (if no space is available, your grapple fails)... (Source: D20PFSRD)
So, in effect, when you make a successful critical hit with a harpoon, then succeed on the subsequent CMB check, you grapple the target and move it to an adjacent open space.
RAW: Yes. You can throw a harpoon to someone 30 metres away and make him being magically pulled to an adjacent square. You are then considered grappled as described in the grapple weapon property text, ie you can only move or damage the creature. You can't for example get another weapon to replace the harpoon you have thrown.
Of course this is ridiculous and nobody will apply these rules as written. You can however make a houserule, here a few examples:
If you throw a weapon with the grapple property and you have tied a rope on if, in case you succeed a critical hit you can attempt a drag test to make the target come to an adjacent square. If it succeeds you can then attempt a grapple as a free action.
When you score a critical hit with a grappling thrown weapon, you can attempt a grapple check. If it succeed the target (but not you) get the grappled condition. The target can spend a standard action to remove the grappled status.
Thrown weapons don't trigger the grapple property