Answer to: replacing hd and reinstalling OSYou can also call apple support and ask them if they can supply you with a installer for your macbook. You could also just buy 10.6... you can get it as low as $25 on amazon or $35 direct from Apple.
Answer to: sleep wake button not workingTry holding the sleep and home button at the same time. Hold them until you see a white apple appear on the screen (ignore the shutdown screen and keep holding the buttons until you get to the white apple. REMEMBER HOLD TILL THE WHITE APPLE!) When holding the buttons for a hard reboot you will see: Screen with shutdown message and slider black screen White apple screen It might just need the hard reboot.
Answer to: Why does my laptop shut down uprompted?A couple things to try. Take the battery off and use the laptop from wall power. If you don't experience the problem, bad battery. Another thing to check. Right after it goes black screen, put your hand on the keyboard and a couple other places. Does it feel hot? Also listen for your fan, can you hear it running? is it loud? There is always a chance that the system is cutting power to protect itself from overheating. If the laptop feels hot and you hear the fan running loud or not running at all. that could be the problem. If it feels hot and the fan is running, get a can of air and try to make sure there is no debris blocking the air flow. If it feels hot and you can't hear the fan running, you might need to open the case and check to make sure the fan is plugged in. If it is plugged in you might need to replace it (test it before you replace it).