Having casual sex has been linked to a higher incidence of depression in young adults, according to a recent study.