
Granting Pokémon Go the permission to access your camera should fix this problem.
In iOS:
Open the Settings app
Scroll down to your list of apps and choose "Pokémon Go"
Switch "Camera" from off to on
In Android:
Open the Settings app
Tap “Apps” under the Device heading
Select Pokémon Go
Tap "Permissions"
Switch "Camera" from off to on
If you want to save any pictures you take, you should also turn on the ability to access photos.