Does the oscillating electric and magnetic field of a photon generate gravitational waves? From my understanding, little as it may be, because photons have energy they warp spacetime. The energy is expressed as an oscillating electric and magnetic field. Would this mean that the energy is also oscillating and would generate a gravitational wave?
 A: A “photon” is a quantum entity while “gravitational wave” is an entirely classical (non-quantum) concept. Generally, a good classical description of a quantum physical system could only be achieved when the number of quanta is large. Consequently, question about a single photon generating a (classical) gravitational wave does not have a consistent answer. One should either stick to fully classical description of both electromagnetic and gravitational field or instead allow for gravitons, quanta of gravitational field.  Note, that while full theory of quantum gravity is still lacking, there is universal consensus that perturbative quantum gravity should provide a good description of phenomena involving gravitons at energies below the Planck scale.
So here are a few facts about interaction of electromagnetic and  gravitational fields:

*

*A wave packet of EM radiation could produce gravitational waves. Standing EM wave inside a resonator could also produce gravitational waves. Because in nearly-flat spacetime gravitational waves couple to spatial stresses, oscillating EM field is a more “effective” source of gravitational waves than moving nonrelativistic bodies per same mass–energy.


*A single photon traveling in flat spacetime cannot produce a graviton. Such process is prohibited by conservation laws (of energy, momentum, angular momentum), just like a single electron alone cannot produce a photon.


*A photon traveling in background (e.g. magnetic) field can undergo conversion to graviton.
A: You are correct, photons do have stress-energy and they do create their own gravitational effects, like bending spacetime.

So the idea that photons bend spacetime is part of mainstream cosmology, such as the standard Lambda-CDM model.

Do photons bend spacetime or not?
Now you are saying that the oscillating EM field would create gravitational waves.
In reality, to create GWs, you need objects whose motion involves acceleration and its change, provided that the motion is not spherically or rotationally symmetric.

A simple example of this principle is a spinning dumbbell. If the dumbbell spins around its axis of symmetry, it will not radiate gravitational waves; if it tumbles end over end, as in the case of two planets orbiting each other, it will radiate gravitational waves.

https://en.wikipedia.org/wiki/Gravitational_wave
More technically, the second time derivative of the quadrupole moment of an isolated system's stress-energy tensor must be non-zero to create gravitational waves. Since the photon alone (as an isolated system) in your case does not satisfy this, it would not emit gravitational waves, but for example a system of a photon orbiting (in the photon sphere) a black hole could emit gravitational waves (though to have detectable GWs at our current technological level, you need two actual black holes merging).
A: Photons are massless and you need massive particles to generate gravitational waves. So clearly it cannot generate gravitational wave. We need massive particles for gravitational waves as, gravitational waves are periodic oscillation of the spacetime framework. Only massive particles can create curvature in spacetime and not massless ones. Massless particles only follow the trajectory set by the curvature of spacetime. As far as I know, the massless particles cannot effect the curvature of the spacetime.
In case you are unfamiliar with the term massive, it is used for any particle with mass, no matter how small or big it may be. By massive, we mean it has mass and it has nothing to do with its size.
