Hi bharath_4.
Do you get any specific error or any other type of message when you try to format the flash drive? Does it say that it's write protected?
You could try the flash drive with a different device/computer, to see if the same thing happens again. Another option would be to try the flash drive manufacturer's formatting tool (most SD card and flash drive manufacturers offer such tools for their devices), to see if you'd be able to reformat the pen drive this way.
Please let me know how it goes.
Boogieman_WD