There is a very good dialogue between Davos and Stannis about his claim. I believe it is in A Storm of Swords. After the battle of the Blackwater, Ser Axell suggests that Stannis take Lord Celtigar's castle and kill everyone there, as punishment for their lord's "treason" in bending the knee to Joffrey. In the discussion, Stannis says that it is every man's duty to stay loyal to his king, to which Davos responds: As you stayed loyal to King Aerys?
In the aftermath Stannis recollects to Davos (paraphrasing from memory):
My blood or my liege? My brother or my king. That was a hard choosing, Davos.
This to me suggests that if not for the fact that Aerys had been mad, Stannis might not have joined the rebellion at all. However that may be, it is clear and has been shown many times that Stannis holds the law and what is right and proper in very high regard. The principal example GRRM gives us is that even though Davos saved Stannis and all his men during the siege of Storm's End, by smuggling in food, he still cut off his fingertips as punishment for his previous smuggling.
One good act does not wash out a bad. Or one bad one a good.
When his Hand, who is also his wife's uncle (I think), sues for peace with the Lannisters behind his back, Stannis throws him in the dungeons and lets Melisandre burn him. Because "it is the law".
No, if Stannis was made aware of Daenerys and her claim, and the power she has amassed, I believe he would give it considerable thought. He knows for a fact that she lives, and that Viserys - the true King - lived, but has written them off because Viserys was who he was (most likely mad). He sat on King Robert's small council and heard Varys' reports over the years. But he most likely knows nothing of her current conquests, her dragons and her armies. And he does not know the ruler she has become.
I cannot say for sure - and we may never know, since there is a real possibility that he dies before they ever meet - but I believe he would consider her claim legitimate. And therefore, he would have no choice but pledge her his allegiance.
However, I do not think at this point that the Iron Throne is his primary goal, but the battle against the Long Night and the Great Other. Believing that he is Azor Ahai born again may be something that would cause him to oppose Daenerys, since he cannot give up his power to someone who would not take his battle seriously. But I think that Melisandre will be the link there, as she can clearly see stronger links to the prophecy of Azor Ahai in Daenerys than in Stannis.
The Black Flame, Moqorro, has already joined up with Victarion, who will join up with Daenerys. Moqorro is on a mission from the High Priest Benerro to guide and help Daenerys. It would be a very interesting meeting, should Melisandre and Stannis meet Moqorro and Daenerys.