Morganella was sent home in disgrace after directing an offensive jibe at South Korea's players following Switzerland's 2-1 defeat to the Asian team on Sunday.
In a post on Twitter that was later deleted, Morganella wrote: "I am going to batter the Koreans, burn them all... bunch of 'trisos'."
'Trisos' is a French slang word for people born with Down's Syndrome.
Williams, speaking after winning in both the Olympics singles and doubles at Wimbledon on Monday, said Swiss Olympic officials were correct to punish Morganella severely because it's vital to show racism will not be tolerated.
"I think it's honourable if they had to kick someone out because of that, then they realise there's no colour bounds," Serena said.
"It's definitely not a bad thing. This is an event that is for all races and all countries around the world. This is just purely for sport."
Greek triple jumper Voula Papachristou was also kicked out of the Olympics last week for a racist comment on the micro-blogging site which poked fun at Africans living in the country.
And 14-time Grand Slam winner Serena, an avid user of Twitter herself, admitted she has been extra-careful with what she writes on the site since then.
"I heard about the Greece one, so I've been really careful about saying things in social media. I haven't been on my account too much," she said.
"I would be devastated if I got kicked out of the Olympics."