Algebraic geometry as such appears because it happens to capture important aspects of the geometry of strings.
For instance the partition functions of superstrings are elliptic genera and the best way to understand this is to regard a torus-shaped string worlsheet as an elliptic curve, regard the moduli space of possible worldsheet tori as the moduli stack of elliptic curves or actually as the derived moduli stack of derived elliptic curves in derived algebraic geometry to finally understand that the Witten genus (superstring partition function) is but the shadow of the string orientation of tmf.
Similarly the target space Calabi-Yau geometries of interest due to the relation between supersymmetry and Calabi-Yau manifolds is best understood with tools from algebraic geometry. Similar statements apply to a bunch of other compactification geometries.
Now motives is another story. Motivic structure enters quantum physics in two dual guises, related to on the one hand algebraic deformation quantization and on the other hand to geometric quantization.
In the first case one observes that formal deformation quantization of $n$-dimensional field theoytheory amounts to choosing an inverse equivalence to the formality map from $E_n$-algebras to $P_n$-algebras, this is explained here. The automorphism infinity-group of either side therefore naturally acts on the space of quantization choices and one shows (conjectured by Kontsevich, recently proven by Dolgushev) that the connected comonentcomponent group of this is the Grothendieck-Teichmüller group, a quotient of the motivic Galois group. Related to this in some way is Connes "cosmic Galois group" acting on the space of renormalizations of perturbative quantum field theory. According to Kontsevich, this explains the role of motivc structures in correlation functions in perturbative field theory, see at Motivic Galois group action on the space of quantizations.
On the other hand, in full non-perturbative geometric quantization in its modern cohomological form as geometric quantization by push-forward one finds a "cohesive" form of actual motivic cohomology exhibited by actual pure motives. In effect, a local ("extended") action functional on a space of histories is exhibited by a correspondence with the action itself exhibited by a twisted bivariant cocycle on the correspondence space, and the motivic path integral quantization of this corresponds to the induced pull-push index transform.
This is explained in the last section of arXiv:1310.7930 "differential cohomology in a cohesive topos" with more details in the thesis "Cohomological quantization of local prequantum boundary field theory".