I want to edit the .wsp file in visual studio, please help me.
You cannot "edit" a .wsp file directly in Visual Studio. If you want to edit the source code, you actually need the source code, not the .wsp file.
If you just want to see the contents of the file, you can rename the somefile.wsp to somefile.cab and open it. So at least you can view/get the xml-files and .dlls
The only way to get the source code out of an .wsp is reverse engineering the dll (e.g. with .NET Reflector). But this is not recommended if the Sharepoint solution package is copyrighted (and if it's not yours or your company's development, it's most likely a sure bet that it IS copyrighted), because that may not be legal depending on the usage conditions and the country you live in.