I have now newly written a [detailed “Idea” section](http://ncatlab.org/nlab/show/cohomology#Idea) at the nLab entry on cohomology, which should give a helpful overview on the observation that and how every flavor of cohomology ever considered is nothing but the study of connected components in the hom-spaces of some $(\infty,1)$-topos.