We study connections on higher structures such as Lie and Courant algebroids and their description as differential graded manifolds and explore the role of their basic curvature tensor and of the Atiyah cocycle in topological sigma models and higher gauge theories. The basic curvature of a connection on a Lie algebroid is a measure for the compatibility of the connection with the Lie bracket and it appears in the BV operator of topological sigma models in 2D. Here we define a basic curvature tensor for connections on Courant algebroids and we show that in the description of a Courant algebroid as a QP manifold it appears naturally as part of the homological vector field together with the Gualtieri torsion of a generalised connection. The Atiyah cocycle of a connection on a differential graded manifold is a measure of the compatibility of the connection with the homological vector field. We argue that in the graded-geometric description of higher gauge theories, the structure of gauge transformations is governed by a Kapranov L ∞ [1] algebra, whose binary bracket is given by the Atiyah cocycle. We also revisit some aspects of derived structures and we uncover the role of the Atiyah cocycle in deriving E-tensors for E-connections on Lie and Courant algebroids from ordinary tensors on differential graded manifolds.