it’s generally best to shoot with the sun behind you, but pay attention to the light you are working with. Which way are the shadows falling? How is the light affecting your subject? Is the subject squinting? Often times changing the location of you, or the subject can reveal a new look & feel to the photo.
This link has another great tip for landscape photography. http://www.digitalcameraworld.com/2013/01/06/how-to-track-the-sun-for-perfect-landscape-photos/