Organic dyes, both in solution phase and in immobilized condition, are useful tools for optical detection. Studies have shown that spectral property of dyes in solution are different from that in the immobilized state. In this work, we have studied the optical properties of dyes in solution as well as in immobilized state with three categories of dyes, monocarboxylic mono-functional, bi-carboxylic bi functional and bi-carboxylic mono-functional. Two linkers (APTES and PEI) were used for attaching the dyes to the silanol terminated silicon surface. Geometries were optimized using density functional theory. Time dependant density functional theory was used to calculate the absorption spectra of free and attached dyes. B3LYP and CAM-B3LYP hybrid functional were used for the theoretical calculations. Experimental results showed that dyes upon immobilization experienced a large red shift in the absorption maxima. The value of the red shift in absorption maxima was comparable for both the linkers. Theoretical calculations indicated this large shift is not due to bond formation between dye and the linker. This leads to the conclusion that aggregation takes place between dye molecules upon immobilization but not in solution, and this causes the large red shift in the absorption maxima values of the immobilized dyes.