Since the 2006 coup, the country has periodically been rocked by protests by pro-Thaksin "Red Shirts," who occupied Bangkok's central business district, or CBD, in 2010 and anti-Thaksin "Yellow Shirts," who managed to shut down Bangkok's airports during 2008 protests.
"(Investors) fear that the situation will escalate into something uncontrollable like the airport closure and the CBD protest," said an analyst at a regional brokerage; he requested that he not be named. "It's not a very good scenario for tourism and investment," he said, noting tourism is the currently the main driver of Thailand's economy.
(Read more: Thailand poised for $15 billion of debt sales)
If passed, the bill would likely allow Thaksin to return to Thailand without facing jail time from his conviction for abuse of power. There are also concerns it might allow former Prime Minister Abhisit Vejjajiva and his former deputy, Suthep Thaugsuban, to seek immunity from prosecution for murder for authorizing the use of live ammunition to disperse protesters in 2010; more than 90 protesters were killed in the 2010 anti-government demonstrations.
"The worst-case scenario for the stock market is for the bill to go through the House and become a law. We would expect the protests to intensify and the market to react negatively," said Nithi Wanikpun, an analyst at Nomura in Thailand, in a note. "Tourist arrivals, despite the seasonal fourth-quarter peak season, could be affected by political activities on the streets."
He noted that even if the bill passes, it may be nullified by the Constitutional Court on several grounds. "We believe this is the best-case scenario for the stock market, as in our view it would help alleviate the short-term political concerns," he added.
(Read more: Abenomics speeds corporate investment, but not in Japan)
Another Nomura analyst, Alastair Newton, added, "the current situation appears to us to be volatile and unpredictable, with a non-negligible probability of further degeneration and the possibility of intervention of some sort by the army. Furthermore, heightened political risk could, we believe, persist for a protracted period."
In the event the Upper House doesn't approve the bill, Prime Minister Yingluck Shinawatra, the sister of former Premier Thaksin, could call a snap election, Newton said in a note. "Election campaigning too is potentially a generator of civil unrest, especially in the current febrile atmosphere."
Even before the latest political tension, Thailand's market faced a series of headwinds.
"Other than hopes of a rise in export demand, there is little in the pipeline by way of upside to the outlook. In contrast, downside risks abound, from consumption and investment, both of which seem to have peaked for the time being, to uncertainty about the government's much anticipated THB2 trillion infrastructure investment program," Taimur Baig, chief economist at Deutsche Bank, said in a note, adding the latest economic data "make for grim reading."
(Read more: 'Ground zero' of Asian financial crisis seen sailing through)
He expects Thailand's economic growth to come in below 4 percent for the year.
Deutsche Tisco Investment, Deutsche Bank's Thai unit, set a 1420 year-end target for the SET index, suggesting little in the way of upside. The index is trading around 1407.
"Thailand's star has lost its luster for now," Baig said.
—By CNBC's Leslie Shaffer; Follow her on twitter