If you deleted your all your photos from your iPhone, but iCloud storage still says that there is not enough storage then this might help.
The problem seems to be that when you delete photos from a computer connected to your iPhone with a cable, the Photos app doesn’t update the used storage. So it still thinks you use plenty of gigabytes of storage when the app itself shows you that you have no photos.
To make it update go to Setting, then General, iPhone Storage, Photos and have a look at Documents & Data. For me it still showed the old size, as if I still had all my photos.
After waiting on this screen for a little time (5 seconds), the iPhone crapped itself and exited this screen.
Upon returning, the storage was updated to about 300 Mb which I think it’s just the internal database needed by the Photos app.
Immediately after this, the photos started synchronizing in iCloud.
Follow the screen bellow to solve this problem and free storage on your iPhone: