Weak gravitational lensing surveys are driving a new era of precision cosmology. Obtaining unbiased cosmological constraints from such data sets requires accurate modeling of the imprint of galaxy formation on the large-scale distribution of matter, and of intrinsic alignment correlations between galaxy shapes. In this talk, I will describe current efforts to advance our understanding of these astrophysical systematics to weak lensing. In addition, the deluge of data from next generation surveys will allow us to exploit new applications of the same phenomena for cosmology. I will present a new method to constrain inflationary models of the early Universe from the measurement of galaxy shapes.