The aim of this paper is to construct the thermodynamics of open quantum systems of elementary Bose-gas particles in the framework of nonextensive Tsallis statistics based on modified quantum entropy, which depends on the real deformation parameter q. We obtain generalized expressions for the thermodynamic potential, internal energy, free energy, specific heat, and pressure, as well as the basic thermodynamic equations. Modified equilibrium Bose-Einstein distributions for massive particles and generalized Planck, Rayleigh-Jeans, and Wien laws for photons that can be applied to various physical problems, in particular, to the description of cosmic blackbody radiation, are discussed. The initial basis for such a consideration of a photon gas is the assumption that the photon distribution of the cosmic background radiation (in thermal equilibrium) may differ from the classical Planck distribution due to the influence of long-range gravitational effects at large distances. This influence is probably a reflection of the fact that in remote time matter and light were strongly interconnected. The generalized thermodynamics of a photon gas can be used, in particular, as a theoretical justification for experimental studies of blackbody radiation inside various astrophysical objects.