Could be that MTP has been unselected and needs to be turned back on (in vanilla Android: Settings .. Storage .. Menu .. USB computer connection).
Most likely, though it's a dodgy USB cable - try a different one.
If not, then it will be drivers.
- disconnect the phone from the computer
- uninstall ALL phone related sofware and drivers from the computer
- restart the computer
- restart the phone
If your phone came with PC software, install this - do NOT connect the phone until prompted.
If your phone did not come with PC software, connect it to the computer
In both cases, do NOT disconnect the phone until ALL drivers have successfully installed