The sun provides an explosive, heavenly example of self-organized criticality. Sudden bursts of intense radiation emanate from rapid rearrangements of the magnetic field network in the corona. Avalanches are triggered by loops of flux that reconnect or snap into lower energy configurations when they are overly stressed. Our recent analysis of observational data reveals that the loops (links) and footpoints (nodes), where they attach on the photosphere, embody a scale free network. The statistics of the avalanches and of the network structure are unified through a simple dynamical model where the avalanches and network co-generate each other into a complex, critical state. This particular example points towards a general dynamical mechanism for self-generation of complex networks.