How do I bring back lost Kerbals?
In Sandbox Mode, Kerbals don't die. They "mysteriously disappear".
They respawn after a short while (the original three (Jebediah, Bill, Bob) at a quicker rate than generic Kerbals), and can then be sent to their doom again. And again. And again.
If you want them back to life immediately rather than waiting, you can open your KSP game folder/saves/username/persistent.sfs
with your favorite text editor, find ROSTER
and change the crew members' statuses from state = 3
to state = 0
. This will instantly revive your Kerbals.
I'm not sure if it matters whether the game is running or not, but I would make sure and edit the file while the game is not running.
Source on KSP forums
if you open the debug toolbar and go and open your debug toolbar using alt + f12 and you go to the gameplay tab from there you can enable wether or wether not your kerbals to respawn or not too, and if you would like to bring them back to life immediately you can go to your "saves" folder in your ksp directory go to persistent.sfs file in one of your saves then you just turn the dead kerbal's state from state = 3 to state = 0.
edit: actually the states you can choose are not 0 or 3 they are now: state = available as alive or state = dead.
An update to this answer
First, this is highly suggested as it is hard to tell what effects it may have on the game, to close KSP.
Open the persistent.sfs file. It is located at ksp base folder/saves/savename/persistent.sfs
Find(CTRL+F on windows) ROSTER
and locate the crew member. Change state = Dead
to state = Available
. Save the file.
Reload KSP and load the game as usual.
This can be useful when (with respawn available in career, science or sandbox) the respawn doesn't work.