It's good to dally foolishly, if happily (6)
I believe the answer is:
gladly
'happily' is the definition.
(thesaurus)
'it's good to dally foolishly' is the wordplay.
'it's good' becomes 'g' (abbreviation).
'foolishly' indicates an anagram.
'dally' is an anagram of 'ladly'.
'g'+'ladly'='GLADLY'
'if' acts as a link.
(Other definitions for gladly that I've seen before include "With pleasure" , "Delightedly" .)