White light is composed of varying wavelengths of light. Different wavelengths appear different colours to our eyes.
A red flower appears red because it reflects wavelengths most strongly in the red part of the spectrum (about 650-700 nm). Other shorter wavelengths are absorbed by petals.
By shining a green light, you are using a filter to remove wavelengths of light that are not green. The filter works by reflecting non-green wavelengths, and allowing only green wavelengths to pass through.
As a consequence, the only light to reach the petals is green wavelengths, which are absorbed and not reflected by the red flower. The result is that little light is actually reflected, creating our perception of the flower as black. same for paints also.