Yes grass is greeen due to the chlorophyll in it and sky is blue due to the refraction of light...
why do these behave like that anyway? may be thats a question very difficult to answer. We could say that its their property. Again the question remains, why is it their property? For example...when you are writting a program you give different colors for the graphical interface...you set some constant values here and there..
Similalrly somebody hould have set these values...yes..they are in the genes..thats the code...thats the programm...we can change it compile it and run it....