Ooh, good question. (How big a market is currently is a matter of simple research, so I’m mostly interested in trying to guess about how a market will change.)
I think the way most investors do it is probably by maintaining a “story” about how the world will change that most people haven’t realized, and then matching that story up with ideas they hear.
I’m not sure if there is a more robust or rational approach that actually works. The ideal investment plan would evaluate each idea/“potential market” on the expected value of market size, averaging various plausible scenarios according to their probabilities. But I don’t think many people can run a process like that without injecting a ton of priors about how the world will evolve... it all seems to devolve into an argument over which macro trends matter in the next 10 years or so.
For mature industries you can probably look at published government stats or aggregate the financials of leading companies.
For new industries, it's a ballpark guess. For example, no one knew the market size of social media before Facebook. The best you can do is look at related industries like online search advertising and guess as to how much more people might pay to target ads based on a social media profile versus a Google search.