Likely the "rays" are flare. A polarizer might help, but main solution is to keep the sun from shining on your lens. Not always possible, and not always that distracting. The sun is in the upper right corner of this photo with a "stream" of flare images in line toward the center. It is caused by internal reflections within the set of lenses - the patern will be different for different lenses.
This image has different adjustments to the sky vs the lower part of the image. Without doing that, the sky would be washed out.
_____
Image is a three shot pano roughly equiv to using a 17mm (equv) lens.