In the long run an overheated planet Venus style is much harder to deal with than a cold, nearly airless one. Anything that triggered mass plant death and decomposition could do.
A directed gamma ray burst could affect the solar system: https://www.youtube.com/watch?v=RLykC1VN7NY A nuclear powered bunker seems much more pragmatic than generation ship(s) to another star system to survive one.
I would argue that a civilization that is actually capable of building a generation spaceship, should be capable of defending their planet from GRBs.
How? I have no idea.
Then again, we also have no idea how to build an actually working generation ship :D