Diminished seventh chords are one option you may consider when writing musical lines whereby the melody moves in and out of chords tones (i.e. contains passing tones in the musical line).
You should become proficient at inverting diminished seventh chords so that when you use them each musical line within the resultant voicing is smooth and not disjunct or awkward for the players in the band.
The fully diminished seventh chord works well as a passing chord between chord tones because it is functioning as a temporary V(b9)-I chord progression in the musical line.
In this video, I take the notes of a C major scale (and C6 chord) and use the diminished 7th chord to act as a passing chord all the way up the scale. This is one example of how you could voice four instruments in close position using the diminished 7th chord as the “glue” between the notes of the C6 chord.