The intracellular messenger cGMP has been suggested to play a role in taste signal transduction in both vertebrates and invertebrates. In the present study, we have examined the role of the Drosophila atypical soluble guanylyl cyclases (sGCs), Gyc-89Da and Gyc-89Db, in larval and adult gustatory preference behaviors. We showed that in larvae, sucrose attraction requires Gyc-89Db and caffeine avoidance requires Gyc-89Da. In adult flies, sucrose attraction is unaffected by mutations in either gene whereas avoidance of low concentrations of caffeine is eliminated by loss of either gene. Similar defective behaviors were observed when cGMP increases were prevented by the expression of a cGMP-specific phosphodiesterase. We also showed that both genes were expressed in gustatory receptor neurons (GRNs) in larval and adult gustatory organs, primarily in a non-overlapping pattern, with the exception of a small group of cells in the adult labellum. In addition, in adults, several cells co-expressed the bitter taste receptor, Gr66a, with either Gyc-89Da or Gyc-89Db. We also showed that the electrophysiological responses of a GRN to caffeine were significantly reduced in flies mutant for the atypical sGCs, suggesting that at least part of the adult behavioral defects were due to a reduced ability to detect caffeine.