Its a common problem. Ive had it happen a few times now, think adding corrupted video or mp3 files causes it. Thankfully its an easy fix.
As upintheair said, scan and fix errors. If your comp recoginises the sd card when you plug the phone in, you can just right click on the drive - Tools tab - Check now, tick both boxes. This will fix the problem but it will happen again unless you remove the problem file.
If the SD isnt recognised when you plug your phone in, put the sd card in a usb card reader and do the same (they are pennies from ebay or electrical shops)