Neutral current photon emission reactions with nucleons and nuclei are studied. These processes are important backgrounds for νµ → νe (νµ →νe) appearance oscillation experiments where electromagnetic showers instigated by electrons (positrons) and photons are not distinguishable. At intermediate energies, these reactions are dominated by the weak excitation of the ∆(1232) resonance and its subsequent decay into N γ. There are also non-resonant contributions that, close to threshold, are fully determined by the effective chiral Lagrangian of strong interactions. In addition, we have also included mechanisms mediated by nucleon excitations (N * ) from the second resonance region above the ∆(1232). From these states, the contribution of the D13 N * (1520) turns out to be sizable for (anti)neutrino energies above 1.5 GeV. We have extended the model to nuclear targets taking, into account Pauli blocking, Fermi motion and the in-medium ∆ resonance broadening. We present our predictions for both the incoherent and coherent channels, showing the relevance of the nuclear corrections. We also discuss the target mass dependence of the cross sections. This study is important in order to reduce systematic effects in neutrino oscillation experiments.