Is it ok to be exposed to sun and heat during my pregnancy?

Yes. Humans are sun creatures. We need sunlight to produce vitamin d. Of course you don't want to burn, especially if you are fair skinned. But i think the fear of the sun has gone too extreme. Avoid extreme heat however.