You can't see sunbeams in a vacuum. Pretty much anywhere else is fair game. What we call sunbeams are areas where light from the sun is reflecting off small particles such as dust or water vapor suspended in the air in contrast to other areas that are not directly receiving sunlight. These particles scatter the light from the sun and some of it is scattered in our direction. The same amount of particles shaded by a cloud or anything else do not scatter such light since they are not being directly illuminated by the sun.
Sunbeams, then, are determined by differences in contrast between the way direct and indirect light is reflected to the viewer. The more particulate matter or vapor there is in the air to scatter the sunlight, the more the difference will be between the sunbeams and shaded areas. The greater the difference, the easier it is for us to see them.
Your question seems to be asking when can we see sunbeams. Even when the sun is directly overhead and unshaded to our eyes if there are areas of sky not directly lit by the sun then there will be a difference in contrast between the two areas. In most cases, though, the bright sunlight directly overhead is so bright that it doesn't allow us to see the subtle differences in contrast between the shaded and non-shaded areas in such a way that we would describe as a sunbeam. If a cloud passes between us and the sun, though, we can often see the difference even when the sun is high in the sky.
Two quick snaps taken with a compact Canon Powershot A75 back in 2004. The only difference between the two is that the second is exposed 1 1/3 stops brighter than the first. Notice how only the difference in brightness affects how we perceive the differences between the brighter and darker areas.
When photographing sunbeams, the in-camera or post processing settings can emphasize or minimize these differences. Exposure settings as well as adjustments to overall contrast, shadows, highlights, and even white balance and color saturation can affect the difference between the directly sunlit and the indirectly lit areas in the photo.
In addition to the sky when there are clouds shading some but not all of the light from the sun, we can also see sunbeams in areas shaded by man made objects. If we are inside in a very dusty room with no interior lighting the sun shining through a window will created sunbeams reflected by the dust particles or steam in the air. If there are partially open blinds over the window, we will even see that pattern in the sun beams. If you go to a music concert with theatrical lighting combined with smoke machines, you will also see artificial 'sunbeams' where tight beams of light pass through the 'smoke' that is mostly small water droplets.
Notice that the beams in the concert image are only visible in areas where the light passes through smoke. Once the beam emerges from the other side of the smoke we don't see it until it reflects off whatever solid object it shines upon.