Normally the Oil Markets and the stock market are considered to be separate. But if we just ran out of oil or if something big might happen to the supply it would probably have a negative effect on the economy and the market in general.
It makes sense, if the economy runs on oil then no more oil = one very unhappy economy and as a result there would probably be added selling pressure in the stock market, Oil prices would probably skyrocket though, so I guess there is always a bulls market somewhere.
Personally I’m on the renewable energy bandwagon; hopefully we will not run out of oil any time soon or at least until we supplement it with other sources, wind, solar, water, etc.