Short answer is No; not because there isn't enough energy to do so, but because cooking involves the controlled application of thermal energy over a given time.
You can't cook a cake by turning up the heat to double and halving the time that it's in the oven - you end up with a cake that's charred on the outside and still raw on the inside. Conversely, if you put that cake in the oven at half the heat for double the time, it goes hard all the way through.
I'm pretty sure someone is likely to have come up with a formula that accounts for surface area, volume, and density and thermal conductivity (thanks WRB) of material being cooked to derive the right temperature and time to cook a cake, but we've been perfecting the temp and baking times through sheer trial and error, just like we have with marshmallows.
Everyone knows you don't toast a marshmallow by throwing it straight into the fire for a fraction of a second. You hold it on a stick away from the fire, where the radiant heat is low enough that you can hold it there longer, letting the heat work all the way through.
Nuclear blasts don't work that way, by design. They release as much possible thermal heat as they can as quickly as they can, meaning that if you tried to do it, your marshmallow is going to be (if not vaporised) charred on the outside, and not cooked on the inside.
There is probably a point sufficiently away from the blast where the heat is low enough that it would be right for cooking marshmallows, and that heat would even probably be sustained enough to cook it through given the back pressure of dispersal of the thermal energy. I haven't run the math so I'm not sure where that is but as Grant mentions in his comment, it's a moot point; if you're feeling enough heat from the blast to cook a marshmallow, you're being saturated in radiation as well.
In that sense, it's probably 'safe' to eat on the grounds that the act of cooking it has given you a lethal dose of radiation anyway, so it's not what's actually going to kill you. You may as well enjoy your last meal.