Ultracold atomic systems are ideal candidates for simulating more complex quantum systems due to their high experimental controllability and also for applications in quantum information and quantum computation. A crucial point for comparing experiment with theoretical predictions is the characterization of the many-body state of the atoms. In the present text we study ultracold bosonic gases interacting dispersively with the electromagnetic field, and analyse the kind of information about the many-body state of the atoms that may be obtained by measuring the scattered photons. In an introductory part the basic theory describing the intreraction of the electromagnetic field with a gas of ultracold atoms and the dynamics of ultracold atoms in optical lattices is reviewed. In the main part we study the response of the ultracold atomic system to a weak probe field and its signatures in the scattered light. We show how to measure the density-density correlation function and the excitation spectrum of the atomic gas, as well as the mean value of the atomic field operator. Each chapter has a separate introduction and summary giving a clear picture of the physical system considered.