It is called Quantitative Easing (QE) when central banks buy assets in order to increase liquidity in the market. Dr. Mar Gudmundsson, the governor of the Central bank of Iceland recently said the following:
"In some sense, the capital controls are our QE. It put a floor under asset prices and so was very helpful in turning the economy around,"
If money could flow freely out of the economy the Icelandic króna would depreciate which would be harmful to the economy, because of foreign loans, more expensive imports and therefore higher inflation. This might trigger mass defaults.
Pension funds and many foreigners are locked inside the economy with large amounts of money. They buy government bonds, stocks and other assets but they also have money in deposits. By doing so they increase the liquidity in the Icelandic economy, the government can finance it self domestically (quite cheaply) and stock prices have risen fast.
But the capital controls are of course harmful as well. Credit rating agencies have said that they will not improve the credit rating of Iceland unless the capital controls are lifted. They say that the capital controls should be lifted as soon as possible, but not to hastily. Iceland has to walk a thin line, and the IMF for example has said that this may take three years.