It may happen if Portable Device Enumerator Service is not set as Automatic.
According to Microsoft: "This service enforces group policy for removable mass-storage devicesgment-footer">
1. In the Start Search box type in services.msc and press the Enter Key.
2. In the Services list scroll down to Portable Device Enumerator Service.
3. Double click on it to launch.
4. Make sure the Start up type is set to Automatic,if not change accordingly.
5. Click OK/Apply.
For Windows 8 or,Windows 8.1 Preview Build:
(If you're using a mouse, point to the upper-right corner of the screen, and then click
Search.)
2. In the Search box type type in services, you will find View local services, click on it and follow the rest of the steps as mentioned in Windows 7.