  [Abbreviated] Upcoming large area sky surveys like EUCLID and eROSITA
crucially depend on accurate photometric redshifts (photo-z). The
identification of variable sources, such as AGNs, and the achievable redshift
accuracy for varying objects are important in view of the science goals of the
EUCLID and eROSITA missions. We probe AGN optical variability for a large
sample of X-ray-selected AGNs in the XMM-COSMOS field, using the light curves
provided by the Pan-STARRS1 (PS1) 3pi and MDF04 surveys. Utilizing two
different variability parameters, we defined a sample of varying AGNs for every
PS1 band. We investigated the influence of variability on the calculation of
photo-z by applying three different input photometry sets for our fitting
procedure. For each of the five PS1 bands, we chose either the epochs
minimizing the interval in observing time, the median magnitude values, or
randomly drawn light curve points to compute the redshift. In addition, we
derived photo-z using PS1 photometry extended by GALEX/IRAC bands. We find that
the photometry produced by the 3pi survey is sufficient to reliably detect
variable sources provided that the fractional variability amplitude is at least
3%. Considering the photo-z of variable AGNs, we observe that minimizing the
time spacing of the chosen points yields superior photo-z in terms of the
percentage of outliers (33%) and accuracy (0.07), outperforming the other two
approaches. Drawing random points from the light curve gives rise to typically
57% of outliers and an accuracy of 0.4. Adding GALEX/IRAC bands for the
redshift determination weakens the influence of variability. Although the
redshift quality generally improves when adding these bands, we still obtain
not less than 26% of outliers and an accuracy of 0.05 at best, therefore
variable sources should receive a flag stating that their photo-z may be low
quality.
