The weapon must threaten the square the enemy is leaving. If there are two weapons then choose.
You threaten all squares into which you can make a melee attack... An enemy that takes certain actions while in a threatened square provokes an attack of opportunity from you...
Moving out of a threatened square usually provokes attacks of
opportunity from threatening opponents.
Situation 1: If a monk has a reach weapon and an opponent is immediately adjacent to him, when that opponent moves one square further away the monk can only make the attack of opportunity using his unarmed strike. This is because the reach weapon does not (normally) threaten adjacent squares.
Situation 2: If the opponent was two squares away from the same monk and moved into an adjacent square then the monk can only attack with the reach weapon, as the unarmed strike did not threaten the square the opponent was leaving.
Situation 3: If a character has multiple weapons readied which both can attack the threatened square then the character can choose which weapon to use (including which end of a double weapon). The only restrictions are that the character still only gets one attack per opportunity, even if they have the Combat Reflexes feat.
Situation 4: If the weapon you have readied does not threaten surrounding squares (eg whip, ranged weapons) then you cannot make attacks of opportunity, as you do not meet the requirement: "An enemy that takes certain actions while in a threatened square provokes an attack of opportunity from you"