As some other have said, I think it is a timeout with the login authentication or the app store is somehow losing the authentication. You would think signing out and signing back in would fix it but it didn't.
When mine wasn't working I would get prompted to login again to my iTunes account in settings multiple times a day. Since it started working I haven't been prompted at all to log in again.
When mine wasn't working I would get prompted to login again to my iTunes account in settings multiple times a day. Since it started working I haven't been prompted at all to log in again.