What is the actual mechanism behind the reflection of various colored light by material of different color? When light (composed of photons with different frequency and wavelength) falls on a material, some of it gets absorbed and some get reflected depending upon the color of the material on which it strikes. And the material reflects the light of its own color only, thereby absorbing all the other colored light. So, my questions are:
How would a photon with certain wavelength (say 400 nm) decide to get reflected after striking the material of red color? 
What is the actual mechanism behind the reflection of various colored light by the material of different color?
 A: Atoms and molecules contain electrons. It is often useful to think of these electrons as being attached to the atoms by springs. The electrons and their attached springs have a tendency to vibrate at specific frequencies. Similar to a tuning fork or even a musical instrument, the electrons of atoms have a natural frequency at which they tend to vibrate. When a light wave with that same natural frequency impinges upon an atom, then the electrons of that atom will be set into vibrational motion.  If a light wave of a given frequency strikes a material with electrons having the same vibrational frequencies, then those electrons will absorb the energy of the light wave and transform it into vibrational motion. During its vibration, the electrons interact with neighboring atoms in such a manner as to convert its vibrational energy into thermal energy. Subsequently, the light wave with that given frequency is absorbed by the object, never again to be released in the form of light. So the selective absorption of light by a particular material occurs because the selected frequency of the light wave matches the frequency at which electrons in the atoms of that material vibrate. Since different atoms and molecules have different natural frequencies of vibration, they will selectively absorb different frequencies of visible light
A: 
What is the actual mechanism behind the reflection of various colored light by the material of different color?

The mechanism is more one of absorption than reflection in the sense that what doesn't get absorbed gets reflected. A 'red' looking object reflects white light minus some specific wavelengths (or bands) and this modified (reflected) spectrum we perceive as 'red'.
The absorption works at the molecular level. Most materials are made of mixtures of chemical compounds. In these, atoms are chemically bound to each other by so-called Molecular Orbitals. Here's an example, phenolphtalein:

(Source.)
The lines and double lines symbolically represent the binding molecular orbitals (MOs).
Specifically the double MOs (double lines) are susceptible to photon absorption in the UV, VIS and IR part of the electromagnetic spectrum. This absorption is quite similar to the way a hydrogen atom absorbs photons: the MO absorbs a photon of specific energy (i.e. specific wavelength) and moves to a higher, Quantum Mechanically allowed state of energy.
The reflected light, assuming the absorption took place in the VIS part of the electromagnetic spectrum, will now show a different colour in our perception.

How would a photon with certain wavelength (say 400 nm) decide to get reflected after striking the material of red color?

It's by no means certain that a 'red' material would absorb a $400\:\mathrm{nm}$ photon. It depends on the specific absorption spectrum of the 'red' material.
A: The reflection and refraction mechanism is a collective effect of absorption-emission of photons by molecules and atoms that make up matter. Each material has its own unique molecular (atomic) content. Each molecule (atom) is characterized by a so called spectrum, the sequence of lines we see when radiating that molecule (atom) with electromagnetic field (which is light), see the explanation by @Unnikrishnan. Due to quantization of the electron orbits only certain frequencies can be absorbed and emitted by a certain molecule (atom). The set of rules called quantum selection rules tell us which frequencies are absorbed. So, if the resonant frequency of a molecular (atomic) structure is, say, red, its gonna actively absorb red photons, leaving the rest to propagate further. Essentially, this sort of things stand behind the "color" of material.
A: The concept of color does not have a pure physics definition. It is necessary to have photons in order to perceive color but there is not a one to one correspondence between the frequency of light emitted and absorbed by a material, and the perception of color.

Color vision is the ability of an organism or machine to distinguish objects based on the wavelengths (or frequencies) of the light they reflect, emit, or transmit. Colors can be measured and quantified in various ways; indeed, a person's perception of colors is a subjective process whereby the brain responds to the stimuli that are produced when incoming light reacts with the several types of cone cells in the eye. 

The visible light spectrum 

Has a one to one correspondence with the wavelength of the light , as seen in the linked table. The other answers are discussing the way this physical spectrum arises from atomic and molecular transitions, depending on the material. But the same color "red" may be perceived by the brain even though the physics wavelength of  "red"  is not in the light beam reflected. Color perception is not explainable by physical wavelengths alone and there are various models . 
Thus the answer to your question is not simply within physics , it depends on the materials and their molecular structure and also on the eye of the observer  to get a specific color perception. 
A: I have never read a really good explanation of how opaque materials absorb light, but I think Amrit Sharma must be wrong in his explanation of the absorption of the color red. He talks about a material with a strong electronic resonance in the red spectrum, and supposes that those electronic vibrations are transformed down into lattice vibrations. I don't think that can be right.
If there is a strong electron resonance in the red spectrum, I'm pretty sure the material will look red. For light to be absorbed, it must be converted to mechanical lattice vibrations of a lower (much lower?) frequency. The mechanism for this is obscure...or at least, it is not easy to find a convincing explanation. The notion that this conversion is mediated by the electron resonances and is tempting, but I do not believe it is correct. There is no obvious mechanism for the down-conversion of frequencies. 
I believe the true explanation must lie in the direct interaction of the incident light with the mechanical modes. We all know there are piezo-electric materials that exhibit a voltage when they are stressed, but it is easy to forget that every mechanical vibration generates some electric fields because the positive charged lattice ions will surely not drag the surrounding electrons along with them in perfect synch. Piezo-electric materials are special because the voltage builds up to a point where it can be measured externally, but almost all materials will surely have some internal piezo-electric effect. If there is, then it turns out there is a strong interaction between the incident light wave and the internal piezo-electric field when those two systems share the same wavelength. The mechanism is not much talked about, but it is actually the same mechanism responsible for the Compton effect. I explain this in a blogpost which you can find here. 
The key point is to remember that in the Compton effect, you are actually removing energy from the light wave. That is something you don't get simply by stimulating the electron excitations...you store some energy, but that energy is eventually given back at the same frequency it came in. Not so the Compton effect. So I think this type of mechanism, with its direct interaction with a shared wavelength and an actual down-conversion of the incident light frequency, must be responsible for the absorption of light in opaque materials.
