Recent developments in fabrication of van der Waals heterostructures enable new type of devices assembled by stacking atomically thin layers of two-dimensional materials. Using this approach, we fabricate light-emitting devices based on a monolayer WSe$_2$, and also comprising boron nitride tunnelling barriers and graphene electrodes, and observe sharp luminescence spectra from individual defects in WSe$_2$ under both optical and electrical excitation. This paves the way towards the realization of electrically-pumped quantum emitters in atomically thin semiconductors. In addition we demonstrate tuning by more than 1 meV of the emission energy of the defect luminescence by applying a vertical electric field. This provides an estimate of the permanent electric dipole created by the corresponding electron-hole pair. The light-emitting devices investigated in our work can be assembled on a variety of substrates enabling a route to integration of electrically pumped single quantum emitters with existing technologies in nano-photonics and optoelectronics.