SD card problem, card gets suddenly removed and later added- Sony Xperia X8
Looks like the cause of you problem might be:


Your SD card is corrupted or with some problem
Your version of Android is very outdated and might have bugs


Try to use another SD card, if you get the same problems then I highly recommend you to flash a custom ROM like CyanogenMod 7 for example. Here you can get some tutorials about how to make it Update Xperia X8 with official firmwares or custom firmwares