Delighted when the child has a bad dream (7)
I believe the answer is:
charmed
'delighted' is the definition.
(I know this)
'the child has a bad dream' is the wordplay.
'the child' becomes 'ch' (abbreviation for child).
'has' is a charade indicator (letters next to each other).
'a bad' is an anagram indicator.
'dream' is an anagram of 'armed'.
'ch'+'armed'='CHARMED'
'when' acts as a link.
(Other definitions for charmed that I've seen before include "Entranced" , "Unusually lucky" , "Enchanted" , "blessed by fortune" .)