Making money off advertising is a brutal game for any social media platforms that are not Facebook or Google, Sun Microsystems co-founder Scott McNealy said Wednesday.

"They're owning so much of the digital advertising space, and the space hasn't really evolved as well as people wish it had," McNealy said on "Squawk Box."

McNealy, CEO at Wayin, said because Google and Facebook have gained a massive share in the online ad space, everybody else is trying to go after them. He added the click-through rate for ads has declined significantly in some spaces compared to 20 or 30 years ago.

"It was in the mid-90s AT&T did the first digital banner ad, and they had a 43 percent click-through rate," he said. "Now, the click-through rates are under 1 percent. Twenty percent of the people have ad blockers ... As many as half the click-throughs are accidental."

Late last month, market research company eMarketer showed the two tech giants are set to continue their dominance in the digital advertising space. Google is likely to make nearly $73 billion in ad revenues in 2017, while Facebook will make about $33.7 billion, the company forecasted.

McNealy's comment came after Twitter struck a more optimistic tone about advertising following its first-quarter earnings results. Chief Financial Officer Anthony Noto said Wednesday the company has signed 32 ad deals since the last earnings call. He added the team has done a better job demonstrating to advertisers the return on investment from Twitter's ad products.

—CNBC's Julia Boorstin and Lucy Handley contributed to this report.