In singleplayer, you have to have cheats enabled and use /gamerule mobGriefing false to disable creeper and ghast explosions as well as endermen picking up blocks.
In multiplayer, you can choose some of the plugins available depending on your server.
Part of survivial gameplay is learning how to protect your facilities from creepers. I'm not telling you that you should like it or that I think disabling the explosions is "bad". I'm just saying I don't lose expensive bits to creepers because I decide on their placement with creepers in mind (lighting, barriers, explosion resistant enclosures, etc.) Just some food for thought.