I went over this with a music teacher awhile back. He went over how if you are changing to the A chord, then you want to land on the note A on your guitar in the melody right when you change to the A chord. This goes for the other chords in the chord progression for the rhythm guitar.You can also play some of the other notes in which make up the chord when you change to it and that would be harmonious. But I am wondering, what else is there to making the background rhythm guitar harmonious with the foreground melody? Thank you.
Well, at a base level you simply want to make sure that the notes being played simultaneously sound nice together...a solid understanding of intervals, the major scale, chord construction and basic harmonising will help you determine that much easier than trial and error.
Basically what Steve said. Learn about chord construction and intervals.