The main argument of this work is the application of advanced techniques for the optimization of single photon communication and in general of single photon applications. In particular this contribution is about the development of a quantum cryptography setup that we called QuAKE. The system has been designed and implemented in our labs and include in the hardware some advanced temporal and spatial filtering techniques. These features has been realized respectively with an ad hoc electronics and with an adaptive optics system, the latter developed entirely in our department. The high level software for quantum cryptography has been also implemented and many optimizations have been realized both in the logical design and in the single algorithms. The last part of this thesis describes an astronomical instrument, called AquEYE, developed by our group and capable of time tagging single photons coming from celestial sources.