Some Memory card / Pen drive have written protection switches When it enabled they prevent files from being deleted, It also stops you from accidentally formatting your Memory card/Pen drive. It’s a positive side of write protection.
But! Sometimes, while trying to format, your Windows will tell that “This drive is write protected” and will refuse to format even after disabling the write protection switch (if there’s any).
Here is the step by step procedure for that
http://www.letechworld.com/remove-write-protection-from-pendrive-memory-cards-usb-sticks/