This thesis addresses two of the main materials for solar cells, namely silicon and the family of halide perovskites. For silicon, light trapping structures are investigated for solar cell applications while perovskite materials are investigated as a gain material for optoelectronic applications. Light trapping allows the capture of photons that might otherwise be lost, especially at the red end of the spectrum where silicon is less absorptive. The key is to enhance the efficiency of silicon cells by thinning down the wafer and reducing the bulk recombination losses and to achieve a higher Voc while maintaining strong light absorption (represented by a high short circuit current, Jsc) by applying efficient light trapping schemes. It is still an open question whether nanostructures are beneficial for real devices, especially since highly efficient solar cells employ >100 μm thick absorber materials and use wet etched micron-sized pyramids for light trapping. In this thesis, I conduct a study which compares nanostructures and pyramid microstructures on wafer-based silicon solar cells. This study is important because (1) most light trapping nanostructures are investigated only in the optical regime, while I realize them on silicon devices to analyze both their optical and their electrical character; (2) nanostructures perform better than microstructures in wafer based silicon solar cells, highlighting the effectivity of nanostructures even in wafer-based silicon. Here, the nanostructures comprise wet and dry-etched quasi-random structres and they are compared with pyramidal microstructures. A photocurrent as high as 38 mA/cm2 for a dry etched quasirandom nanostructure is attained experimentally, which is 3.2 mA/cm2 higher than wet etched pyramids fabricated in the same batch. The other material which is now becoming very popular in the solar cell community is the family of metal halide perovskite materials that are increasingly attracting the attention of optoelectronics researchers, both for solar cell and for light emission applications. The ultimate is in simplicity, however, is to observe lasing from a continuous thin film, which has not been aimed before. Here, I show perovskite random lasers; they are deposited at room temperature on unpatterned glass substrates and they exhibit a minimum threshold value of 10 μJ/cm2. A rather special feature is that some of the films exhibit single and dual mode lasing action, which is rarely observed in random lasers. This work fully exploits the simplicity of the solution-based process and thereby adds an important capability to the emerging field of perovskite-based light emitters