The spontaneous emission rate of fluorescencent species in general is affected by its environment. Geometrical structure and material composition of the environment can yield strongly increased rates. This effect is known as Purcell effect, and the magnitude of enhancement of the emission rate in a cavity is known as Purcell factor. The Purcell factor is proportional to the cavity mode's quality factor (Q factor) and inversely proportional to the modal volume. This implies that strongly resonant structures with small length scales (of the order of the wavelength of light) can greatly influence fluorescence. However, not only the emission rate can be controlled by a suitably chosen environment, but also the directional properties of the emitted light field can be engineered by placing the emitter in custom-made environments. In the regime of optical wave phenomena on nano-meter length scales (nano optics), Maxwell's equations for the 3D, vectorial electromagnetic field distribution can to be solved numerically in order to quantify the expected emission rate and far field radiation patterns. In order to obtain specific functionalities of optical devices, numerical optimization is performed. I.e., in numerical computations, structural parameters (layer thicknesses, structure dimensions, material composition, etc) are varied until a parameter set is reached which yields best performance for the specific functionality. This numerically optimized structure can then serve as design pattern for experimental realizations. We review our recent developments of finite-element method based and machine-learning inspired optimization algorithms [1]. We have applied these methods in order to optimize light extraction efficiency of quantum dots embedded in deterministically fabricated cavities [2] and in periodic nano-structures [3], as well as extraction efficiency from structured light emitting diodes (LED, OLED) [4]. We have also investigated possibilities to manipulate emission properties in chiral photonic structures [5], and to design vertical cavity lasers [6]. Further, in applications like light trapping in solar cells, for enhanced photovoltaic efficiency, the related problem of maximizing coupling of light of specific spectral properties into nanostructured solar cells can be treated [7]. In this contribution we will further present recent results on optimization of photon extraction efficiency from single photon sources for applications in quantum technology. This project has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Sklodowska-Curie grant agreement No 675745 (MSCA-ITN-EID NOLOSS) and from the EMPIR programme co-financed by the Participating States and from the European Union’s Horizon 2020 research and innovation programme under grant agreement number 14IND13 (PhotInd). We further acknowledge funding by Einstein Foundation Berlin (ECMath-SE6) and by Freie Universität Berlin (Dahlem Research School). [1] P.-I. Schneider, et al. Global optimization of complex optical structures using Bayesian optimization based on Gaussian processes. Proc. SPIE 10335, 103350O (2017).[2] M. Gschrey, et al. Highly indistinguishable photons from deterministic quantum-dot microlenses utilizing three-dimensional in situ electron-beam lithography. Nat. Commun. 6, 7662 (2015).[3] C. Barth, et al. Increased fluorescence of PbS quantum dots in photonic crystals by excitation enhancement. Appl. Phys. Lett. 111, 031111 (2017).[4] L. Zschiedrich, et al. Numerical analysis of nanostructures for enhanced light extraction from OLEDs. Proc. SPIE 8641, 86410B (2013).[5] P. Gutsche, et al. Locally enhanced and tunable optical chirality in helical metamaterials. Photonics 3, 60 (2016).[6] N.N. Ledentsov, et al. Direct Evidence of the Leaky Emission in Oxide-Confined Vertical Cavity Lasers. IEEE J. Quant. Electron. 52, 2400207 (2016).[7] K. Jäger, et al. Simulations of Sinusoidal Nanotextures for Coupling Light into c-Si Thin-Film Solar Cells. Opt. Express 24, A569 (2016).