The first thing that I usually try in Windows 7 (assuming the drive does not have a physical lock and if a flash drive it is not really old and worn out preventing further writes) is to set the Win 7 registry key to allow writes.
Login as an administrator on the computer. Open regedit.exe by typing that in the start search box. Navigate to this key:
You might need to create the key StorageDevicePolicies if it does not exist yet.
Select the StorageDevicePolicies key with a right-click into the right window.
Select New > Dword (32-bit) Value from the menu and name the new entry WriteProtect.
Double-click the new WriteProtect key and change the value to 0. If you want it to be read only you can change it back to a value of 1.
Save the key changes by clicking OK after each.
Restart your computer and then attach and test the USB device.
There is one other thing that I use if that fails in Windows 7 (older versions use a different syntax), and it has always worked for me. Plug the device in, perhaps into a different USB port, then use diskpart to change its attributes:
Open the command prompt box with right click and run as administrator
Type each of these commands one at a time in this order:
select disk n (where n = the problem disk)
attributes disk clear readonly
After the attributes command you should get a response that it was successful.