No, you don't need to have your iPhone unlocked to check its storage. However, you will need to connect it to a computer or sign in to iCloud.