Theres a lot of new features for the execute command, it's now packed with uses. Here's the command you're looking for:
/execute at @r run summon lightning_bolt
To break it down simply, the execute now works by adding parameters onto the command. In this example, I added the 'at' parameter, which will change the execute command's location to the location of a random player (@r). Then, it runs the command summon lightning_bolt using the 'run' parameter, running the command at the location of the random player.
Other parameters can be found here, you should take some time to learn them, because a lot of them are very useful, and open the door to things that were never possible before.