The diminished 7th arpeggio is most commonly associated with the minor key. If you build a chord off the 7th degree of A harmonic minor, you get G# B D F.
In A minor it usually functions as a leading tone chord that resolves one fret higher into the tonic chord (Amin).
Once you understand how it functions in the minor key, you can borrow that function and apply it anywhere.
Say, for example, you have a G chord moving to a C chord. You can lead to the C chord by playing diminished 7 one fret below the chord – G Bdim7 C. You’ll see this often as a way to transition from one chord to a chord two frets higher – G Amin becomes G G#dim7 Amin.
The other common use also comes from the minor key. That G#dim7 from the A harmonic minor scale is acting like an E7b9 chord (E G# B D F).
You already know that the dim7 chord repeats every three frets. So G#dim7 is also Bdim7, Ddim7 and Fdim7. The Fdim7 is the important one. If you use Fdim7 over and E7 chord, you get that E7b9 function. All you have to remember is dim7 up one fret from the chord you’re playing it over.
E7 is usually used to lead back to the home chord of a progression – E7 A. You can play that Fdim7 over the E7 and get some nice tension that resolves to the A chord.
Here’s where you can have some more fun.
If you’re playing a blues in E, your I chord is E7. That chord moves to the IV chord (A7). You can whip some Fdim7 over the E7 to get some of that same tension before moving to the A7 chord.