To summon lightning through commands, you just need to type “/summon lightning_bolt”. This is the case for every version of Minecraft. If you want to summon a lightning bolt on a specific location, you can add coordinates after “lightning_bolt”. For example, “/summon lightning_bolt 320 70 -330”.