One place where secondary dominants are often used is where the music doesn't want to go straight to the dominant, but sounds like it's going to modulate to that dominant, although in reality it's just going through a 'minimodulation' to come back to the original key.
It works particularly well if a melody note is in the root chord, but also in the secondary dominant. In C, for example, C or E would work, as C is the b7 of the sec. dom., whilst E is the 9th - still a dominant sort of note. Thus the harmony would be C-B-C and E-F-E, both together making a strong semitone pull back to the root chord.