It's not that they're totally accurate, it's that they're as accurate as it is possible to be. Why? Because if you knew of a better way to determine the truth, you would do so, trade on that information, bump up (or down, if shorting) the price to reflect that information, and take your profits so you could do so again. Conversely, if you're just trading randomly, somebody with better information will take all your money and you won't be able to continue trading.
The price that's reflected in a market could be considered residual uncertainty that nobody knows, i.e. if the prediction market for "Will Donald Trump win the 2020 election ?" sells at $0.60 on the $1.00, it means that after all the market participants have crunched their models, aggregated their polls, gone out and canvassed neighborhoods, ran their economic analyses, spoken to campaign insiders, and whatever else they can do, the equilibrium price assumes he has a 60% chance of winning. You don't have to actually perform all those information-gathering tasks to figure this out, you can assume that other people have been incentivized to do so and their results are now reflected in the price.