Basically, what Paine is referring to here is what we would call "fairweather friends" or people who like to hop on bandwagons. He is referring to people who would only support the patriots' cause if that cause seemed to be winning. Otherwise, such people would abandon the cause.
This meaning can be seen from the context in which these words are written. Paine starts this particular piece by saying
THESE are the times that try men's souls. The summer soldier and the sunshine patriot will, in this crisis, shrink from the service of their country; but he that stands by it now, deserves the love and thanks of man and woman.
What he is saying is that there are many people who will "shrink" because the patriot cause is not doing well. He is saying that these hard times will make many give up (this is in December of 1776 and the war is not going well). He contrasts those people with the true patriots who continue to support the cause even when things look bad.
So, the phrases you use are meant to denigrate people who are not really dedicated to the cause of independence--those who only support it in good times (summer and sunshine).