The meaning of key money is different in different parts of the world. At some places key money is said to be a security deposit paid by the lessor by the lessee. At other places it is defined as the bribe given to an agent or any other person in order to secure a position for any property which is supposed to come up for rental. In the latter case the transaction is carried out in an unofficial manner.
Say you are among many persons who are looking for property to rent. Now as the supply is less in comparison to the demand you’d be happy to pay some extra money in order to secure a place. That is money is paid unofficially to the agent and is called key money.