We could have been in sterilization range of a magnetar dozens or hundreds of times since life evolved, so we're just lucky none erupted when we were. The core supermassive black hole blew somehow just 100Mya, fortunately pointed somewhere else.
The only safe-ish corner is very far from everything else, and off-axis from the central black hole. We are deep in the thick soup.
But I don't expect our distant descendants to be dependent on starlight. A nice Kuiper Belt and Oort Cloud are good to stay in for access to building material and fusion fuel, but the most valuable resource, otherwise, will be abundant free cold.
Planets, as such, and sunshine are for the extremest primitives. Nobody advanced would want to be closer to the sun than, say, Neptune.
There is a an obviously uninhabitable zone close to the core black hole, and uncountable similar zones elsewhere, but Sol could move into one of the latter at any time. And, distant events could wipe us out, anyplace else, with decreasing probability as the density of other stars in the immediate neighborhood decreases.
All we can say is that we have not entered any uninhabitable zones in the last billion years or so, i.e. five orbits, and not been blasted too badly from a distance, likewise. Milder events could wipe out everything but deep-sea microbes, which at this late date might not leave time to evolve intelligent life again.
Lots of galaxies have heavy star-forming going on in the rim, with increased risk of supernovas. I don't know if we know whether ours is among those. (I doubt we can tell. Such regions are identified by high UV flux, but UV is blocked by dust, which is plentiful.) But otherwise, farther from the core is generally safer.
Star formation zones are very far from the most deadly places in the galaxy, or even in our neighborhood.