Are dates still good if they sat in a sealed bag in the sun?
If these are dried dates you have no problem. Dried dates are often dried in the sun so having more sun on them isn't likely to be a problem. A bit of condensation isn't an issue, just air them out and put them in a cool, dry place. 

If your dates are fresh they would need refrigeration as they aren't dried as much as fully dried dates, and it is harder to advise. Usually I would say throw them away but dates are pretty resilient so I would say to try a small bit of one and see if they still are good. 

Your dates are probably dried by the way, most are. If they were fresh it would say on the store's website.