The cycle of 5ths developed as the major/minor tonality became established in the work of composers at the beginning of the 18th century, which was the period of the late Baroque. The order of tonality had become a feature of western classical music, an order which was based on the relationship between a tonal centre (the tonic triad in major and minor keys) and secondary chords. Therefore harmonic sequence drove towards a cadence and tension created as a result of moving away from the tonic. The cycle of 5ths is a means of moving the harmony away from and back to the tonic through descending movement (by a 5th).
When adding an accidental to the dominant chord (to the leading noted – G#) it becomes a major chord. Remember that it’s the major dominant chord which is usually used in V – i cadences.
The sequence of chords ii – V – i is very common especially when approaching a cadence. The supertonic chord can be either a diminished chord (B-D-F♮, in A minor) or a minor chord (B-D-F#) if supporting a melody that uses the melodic form of the minor scale – see figure 2 below.
A cycle of 5ths is a device that you can use to extend melodic ideas.
The device enables you to extend melodic material by moving far from the tonic chord. Consider how Corelli does this in the excerpt below. He uses a diatonic cycle which means that he goes through a cycle of chords as they appear in the relative major key (F major).
In contrast, the excerpt from Schubert's work converts the largest tonic to the smallest tonic (E♭) before going through a cycle of 5ths where the bass drops a perfect 5th each time. Click on these links for examples.
How to decide on the notes of the melody.