Their ubiquity and extreme densities make star clusters probes of prime importance of galaxy evolution. Old globular clusters keep imprints of the physical conditions of their assembly in the early Universe, and younger stellar objects, observationally resolved, tell us about the mechanisms at stake in their formation. Yet, we still do not understand the diversity involved: why is star cluster formation limited to 10 5 M objects in the Milky Way, while some dwarf galaxies like NGC 1705 are able to produce clusters 10 times more massive? Why do dwarfs generally host a higher specific frequency of clusters than larger galaxies? How to connect the present-day, often resolved, stellar systems to the formation of globular clusters at high redshift? And how do these links depend on the galactic and cosmological environments of these clusters? In this review, I present recent advances on star cluster formation and evolution, in galactic and cosmological context. The emphasis is put on the theory, formation scenarios and the effects of the environment on the evolution of the global properties of clusters. A few open questions are identified.