Minecraft wiki entry for Weather, associated text: Lightning may be manually summoned with the /summon lightning_bolt command. While it is summoned as an entity, it cannot be referred to by commands or selectors.