"Is it that they are stressed following an unstressed word?" Short answer, in general yes, because in perfect iambic verse a stressed syllable always follows an unstressed syllable.
Iambic pentameter is called iambic pentameter because it is written with five iambi (or iambs) per line. An iamb is a foot, or pattern, that is two syllables that are short-long, or unstressed-stressed.
A typical line of iambic pentameter would look like this, using — to indicated long and ˘ to indicated short syllables.
Iamb = ˘ —
˘ — / ˘ — / ˘ — / ˘ — / ˘ —
Shall I / com pare / thee to / a sum / mer's day
If I write the line using trochees (the opposite of an iamb, — ˘ ) it becomes
— ˘ / — ˘ / — ˘ / — ˘ / — ˘
Shall I / com pare / thee to / a sum / mer's day
You can see that your monosyllables now have the opposite stress.
I could, if I wanted to, re-write it in some sort of tetrameter (so four feet per line) using a mixture of dactyls (— ˘ ˘ , so named because they look like the bones in your fingers) and spondees (— —).
— ˘ ˘ / — ˘ ˘ / — — / — —
Shall I com / pare thee to / a sum / mer's day
You can see that the stress of your monosyllables has altered again.
So the easiest way to work out the stress is to annotate above it with the iambs (trochees/spondees/dactyls or combination of etc) , and then it should be easy to tell which is which.
However, there are times when that pattern is an oversimplification, and doesn't reflect how you'd naturally pronounce the words. In that case, either
- Shakespeare replaced an iamb with a different foot so it isn't absolutely strict iambic parameter (although it might still be — the rules for this come from classical poetry and do allow for some deviations). Perhaps it's more correct to say it's no longer written with five iambi per line.
- It's intended for effect, or to make a rhyme work
- Pronunciation has shifted from Shakespeare's time to now (think of the shift in stress from harass to harass)
The first would help make it sound more like natural speech, the second could be to convey something about a character, to make a joke, or force a rhyme. The third obviously wouldn't have been intentional, but Shakespeare did use variations of words to give the stress and pattern he was after — an example would be "taken" and "tak'n".