Gamma-Ray Bursts (GRBs) are the most powerful sources of electromagnetic radiation in the Universe. There are many open questions about their origin and their nature, and the answers should be searched in the large amount of data collected during these last years. We focused on the study of the their X-ray and optical afterglow properties, as observed by the Swift X-Ray Telescope (XRT) and ground-based optical telescopes. We investigated the observer and rest-frame properties of all GRBs observed by Swift between December 2004 and December 2010 with spectroscopic redshift through a comprehensive statistical analysis of the XRT light-curves of GRBs carried out in a model-independent way. We found out a three parameter correlation that is followed both by short and long GRBs. We also carried out a systematic analysis of the optical data available in literature for the same GRBs to investigate the GRB emission mechanisms and to study their environment properties. Our analysis shows that the gas-to-dust ratios of GRBs are larger than the values calculated for the Milky Way, the Large Magellanic Cloud, and the Small Magellanic Cloud. In this talk I will show the major results of the analysis of this large set of data.