Dopants in semiconductors have been gaining a revitalized role in terms of functionalities after the observation of electron transport through individual dopants. Among many possible applications, a key research direction is toward dopant-based nanophotonics. In a simple scheme, an ionized dopant atom, for instance, a donor, can work as a trap for one electron. The electron can originate from the absorption of a photon and generation of an electron-hole pair in the vicinity of the donor. Here, we will first briefly introduce the basic phenomena for applications based on individual dopant atoms. On these grounds, we will show results for integration of photon detection with dopant atoms in silicon nanostructures, opening new paths to atom-level optoelectronics.