How are you vieing your photos and how were they taken?
If they were taken with an iOS device (iPhone, iPad, iPod Touch) then they have embedded in the EXIF data the camera orientation. If your viewing software is current enough, it will read this information and display the photos in the proper orientation. If you have pulled these photos into a software which does not honoir this EXIF header information, you could have rotated them, and now be causing applications which do honor the header to be rotating the image incorrectly.
To be able to provide moe help, we will need more specifics.