The energy released by a nuke explosion is utterly insignificant compared to the light emitted by the sun so it would not be noticeable at all by a faraway observer looking at our star.
A directional pulse may be an option, but then you have to pick a particular star at which to aim it.
A directional pulse may be an option, but then you have to pick a particular star at which to aim it.