formatting of the SD card will delete entire files stored on it. thus the only option to recover the data back is employing third party sd card photo recovery software. it can even recover data even after formatting of the card.
Well, it seems that your memory card has got corrupted and due to it you are not able to access the photos. But you can get it back by manually for which you have to look at the backup of the photos and images and just following the steps get your photos back but if you don't have backup then you have to take help of Sandisk Card Recovery utility which uses it strong scanning features and get all your photos back in well organized lists. If you have stored backup then you get quickly otherwise go for professional utility.