Flowers are used in Shakespeare's HAMLET to express different ideas. In Act 4 Scene 5, we see her distributing flowers and herbs. It is sign of her sadness and deep passion. Doing this she accused the King and Queen of the guilt she wanted them to feel. Using flowers in this indirect way is safer than directly stating her opinions before the Court.
They also held special symbolical significance in Elizabethan folklore.
1) Rosemary, Rosmarinus officinalis, means to remember and faithfulness
2)Pansy, Viola tricolor, is the symbol for thoughts and faithfulness.
3) Fennel, Foeniculum vulgare, is the symbol of flattery
4) Columbine, Aquilegia vulgaris, is the symbol for male adultery and ingratitude and faithlessness, and Emblem of Deceived lovers
5) Rue, Ruta graveolens, means adultery and genuine repentance of all transgressions for women and everlasting suffering
6) English Daisy, Bellis perenis, means Innocence
6) Sweet Violet, Viola odorata, is the symbol for faithfulness or fidelity
Source: huntingtonbotanical.org/Shakespeare/ophelia.htm