There are two main reasons for data corruption in a memory card.
1. Taking pictures or recording with a camera that is running low on batteries, or has an unstable power supply.
2. Removing the memory card from a device during a read/write operation. Please make sure that you have safely ejected your memory card before unplugging it from your device.
Also, please remember to format your memory card in the camera before using.