are photons only generated from vibrating electrons? only from atomic transitions?
Any accelerating charge produces electromagnetic radiation. This can be protons too (as during production of gamma rays).
Most nuclear reactions involve gamma ray production.
Particle - Antiparticle annihilation produces photons in the gamma region of the spectrum.
Separate names with a comma.