The ruling adds uncertainty to the Kenyan economy, according to Emma Gordon, senior East Africa analyst at risk consultancy Verisk Maplecroft.
"Investors will be concerned about the financial implications and the high risk of violence. With the possibility of the new election going to a second round and the result being contested again, political uncertainty could easily last the rest of the year," she said in a research note.
"Even if the process runs smoothly, investors will fear a re-run of 2007-08 violence until a winner is confirmed and the losing side concedes."
Around 1,200 people were killed and 600,000 displaced due to violence after Odinga lost an election in 2007 against Mwai Kibaki, according to Reuters.
The recent election was overshadowed by reports of police brutality, deaths and post-election unrest. Reuters confirmed 11 deaths, including one girl, within 24 hours, while the Kenya National Commission on Human Rights said 24 people had been shot dead by police in the days after the election.
Odinga called for strikes and alleged he lost because of election fraud. He also said the election commission's IT system had been hacked to manipulate the results.
However, the ruling indicated the increasing independence of Kenya's court system and may help build trust in the country's institutions over the long term, according to Gordon.
"The population's lack of faith in the system is one of the reasons why politics often descends into violence. While this decision cements the view that the Independent Electoral and Boundaries Commission was biased, it demonstrates that independent checks and balances do exist," she said.
Kenya's stock market tumbled on the news of the Supreme Court's decision. Shares on the Nairobi Securities Exchange fell by around 10 percent, triggering a brief halt to trading, according to Reuters. The country's currency, the shilling, also fell by 0.4 percent against the dollar following the ruling, while Kenya's 2024 sovereign dollar bond price fell 1.2 cents, Reuters reported.
David Chadwick, partner at legal services provider Mayer Brown, says the news highlights the political risks for companies investing in Africa.
"It is not uncommon, following a change in power, that the new government might seek to declare an investor's contract invalid or revoke key permits or licences issued to the investor," he said in an email to CNBC.
"We have also seen numerous instances in the last few years, particularly following the downturn in the commodities market, of governments defaulting on their payment obligations under contracts with traders and other foreign companies."
Chadwick warned of other risks, such as capital controls or foreign exchange regulations preventing companies from repatriating profits, or assets being destroyed as a result of political violence.