What determines whether colors you can't see are visible or not?
Color is a double valued variable.For physics there is a one to one correspondence between frequency of light and the color assigned to visible frequencies. As far as the spectrum of colors (rainbow) ultraviolet frequencies are invisible to our eye.
The eye is a biological entity, the retina of the eye has color receptors, and these receptors do see the spectrum . BUT there is also a color perception, that the same color can be accepted by the brain although it has many different frequencies.
Color blindness is due to this biological mechanism being misaligned .
. Why is the UV invisible only sometimes?
. Does it have to do with the flower using iridescent structures to produce color, instead of a pigment?
Now ultraviolet frequency reflecting from materials as in the photos you show, may interact with them and give the perception of "seeing" ultraviolet, and that will depend on the material, which explains the differences in seeing an ultraviolet effect or not in the visible.
Can this happen with red and green, as well?
It might, i.e. the frequency scattering off a material may be degraded in energy and change the frequency( color) a bit. One would have to shine a fixed frequency red or green to see if there is an effect on the particular material.
There are two different mechanisms at work here. It's not the case that humans are "ultraviolet colorblind" or something like that.
1) There is the spectrum that the flower petal reflects or absorbs. This spectrum is continuous and includes ultraviolet and everything at lower wavelengths, visible light, and infrared and everything at higher wavelengths.
2) There is how the different wavelengths within that spectrum are perceived by our eyes and brain. Here's how we perceive color: our eyes have cone-cell receptors that have peak sensitivity at three different wavelengths (roughly, red, green, and blue). We can't see light that our receptors are not sensitive to. In addition, the cornea and lens of our eyes block ultraviolet light so most of it never even reaches the receptors. This is why "visible" wavelengths are visible: we are physically unable to perceive wavelengths outside of that range.
In the example you gave of a flower with yellow petals, where the tips are bright in the ultraviolet, let's look at mechanism (1) first. The tips of the petals reflect yellow and ultraviolet. The center parts of the petals reflect only yellow. Then looking at mechanism (2), the two parts don't look any different to us, because we can't perceive the reflected ultraviolet that differs between them. Bees' eyes cover a different range of wavelengths, so the ultraviolet light reflected from the tips is outside the human-visible range, but within the bee-visible range.
In the example picture of beans and carrots demonstrating red-green colorblindness, looking at mechanism (1): the carrots reflect orange light and the beans reflect green light. Considering mechanism (2), we know that most people with typical vision can see the difference. In the case of red-green colorblindness as in the photo, the two different wavelengths of red and green light are perceived the same by the brain. (There are a number of causes of colorblindness, but usually it's some genetic mutation that causes some malfunction in the cone cells.) This is different than being unable to perceive ultraviolet.
An unaided and healthy (see below) human eye cannot see anything ultraviolet. That's why it is called ultra-violet - in the whole picture of the electromagnetic spectrum it is between the violet visible light and X-rays.
What we CAN see related to UV is the tails of mainly-UV spectral features (be they light or absorbtion). That's why we can see the "black light" lamps - they are mostly UV, but some of their light protrudes the visible area of the spectrum.
A great variety of pigments (both natural and artifical) we see as yellow or orange because some strong and wide UV absorbtion band absorbs also in the violet-blue end of the visible spectrum. Most yellow flowers are yellow exactly because of such spectral feature.
We are not color-blind, we are completely blind to the UV. We can use uv-sensitive sensors and cameras if we need to.
Then again, flowers developed their colors and patterns not for us, but in co-evolution with the insects that not only can see near-UV, but have their very own colors in the UV band. What we see is just the part of the picture, painted for the bees.
(The bees cannot see the red end of the human vision so we are not completely at loss.)
As for the "healthy" point - the violet/UV limit of the human vision is imposed by the eye lens. People using early generations artificial lenses can see way into the UV. No much of a colors there, though.