Check if it is recognized in Disk Management (under Control Panel> Administrative Privileges>Computer Management). If it is, then attempt to format from there. If not, likely hardware failure (will need new pendrive).
Alternatively, you could download and install Killdisk (free utility), then open it while the pendrive is plugged in and see if it recognizes it. If it does, use the erase function to wipe the drive out, then exit and format the drive using Disk Management. Be careful, select the correct drive to wipe, otherwise you could wipe the wrong thing.