Introduction and application of photon based tools for chemical sciences: from basic concepts to optical and x-ray lasers