Stress is associated with poorer physical and mental health. To improve our understanding of this link, we performed genome-wide association studies (GWAS) of depressive symptoms and genome-wide by environment interaction studies (GWEIS) of depressive symptoms and stressful life events (SLE) in two UK population-based cohorts (Generation Scotland and UK Biobank). No SNP was individually significant in either GWAS, but gene-based tests identified six genes associated with depressive symptoms in UK Biobank (DCC, ACSS3, DRD2, STAG1, FOXP2 and KYNU; p < 2.77 × 10 −6 ). Two SNPs with genome-wide significant GxE effects were identified by GWEIS in Generation Scotland: rs12789145 (53-kb downstream PIWIL4; p = 4.95 × 10 −9 ; total SLE) and rs17070072 (intronic to ZCCHC2; p = 1.46 × 10 −8 ; dependent SLE). A third locus upstream CYLC2 (rs12000047 and rs12005200, p < 2.00 × 10 −8 ; dependent SLE) when the joint effect of the SNP main and GxE effects was considered. GWEIS gene-based tests identified: MTNR1B with GxE effect with dependent SLE in Generation Scotland; and PHF2 with the joint effect in UK Biobank (p < 2.77 × 10 −6 ). Polygenic risk scores (PRSs) analyses incorporating GxE effects improved the prediction of depressive symptom scores, when using weights derived from either the UK Biobank GWAS of depressive symptoms (p = 0.01) or the PGC GWAS of major depressive disorder (p = 5.91 × 10 −3 ). Using an independent sample, PRS derived using GWEIS GxE effects provided evidence of shared aetiologies between depressive symptoms and schizotypal personality, heart disease and COPD. Further such studies are required and may result in improved treatments for depression and other stress-related conditions.