The average investor has no idea why interest rates matter so much to the stock market. Most think it only comes into play in regards to the rate at which home buyers can get mortgages. While that is extremely important and a major economic player, it has little to do with the overall stock market on a day to day basis.
Interest rates play a major role for low risk income investors. This is extremely important when discussing the stock market because it is put up against the dividend yield of the S&P 500. For example, the current dividend yield of the S&P 500 is approximately 2% while the 10 year interest rate is 2.5%. In other words, think of a battle between the two vehicles. On one end, investors can choose a low risk vehicle (bonds) with a fixed interest rate for income. On the other end, investors can choose a higher risk vehicle (stocks) with a fixed dividend return (like an interest rate) but with the chance of appreciation.
When interest rates are extremely low, most investors will flock towards stocks to get the dividend income plus the chance of market appreciation. However, as interest rates rise, stocks (which carry added risk) become much less attractive and investors will flock towards bonds.
There is an equilibrium at some Theoretical interest rate where an investor would say, "Hey, the return I can get in bonds is 100% equal to the riskier return I can get in stocks." At that price, an equal amount of money would be distributed between stocks and bonds.
Currently, due to the Federal Reserve policy, interest rates are still too low, driving money into the stock market and inflating it.
As interest rates rise, money can flow quickly out of the stock market, especially when stocks are at current levels (all time highs). This is one of the main reasons the Federal Reserve needs to keep interest rates from jumping dramatically. It literally could create a market crash.