When it comes to getting hacked, the adage is it’s not a matter of if but when. For insurers, there’s a bigger question: how much?

As insurers face mounting requests to cover customers for the costs of hackers stealing information and disrupting business, they’re struggling to set prices based on a short history of claims and clients’ guesstimates of their own risks. So companies including American International Group Inc. are turning to artificial intelligence to help close the data gap and allow them to get comfortable with offering more coverage.

The U.S. stand-alone cyber insurance market is projected to add...