Cyclic nucleotide signaling pathway plays a significant role in various biological processes such as cell growth, transcription, inflammation, in microbial pathogenesis, etc. Modulation of cyclic nucleotide levels by optogenetic tools has overcome certain limitations of studying transduction cascade by pharmacological agents and has allowed several ways to modulate biological processes in a spatiotemporal manner. Here, we have shown the optogenetic modulation of the cyclooxygenase 2 (Cox-2) gene expression and their downstream effector molecule (PGE2) in HEK-293T cells and the development process of Dictyostelium discoideum via modulating the cyclic nucleotide (cAMP) signaling pathway utilizing photoactivated adenylyl cyclases (PACs) as an optogenetic tool. Light-induced activation of PACs in HEK-293T cells increases the cAMP level that leads to activation of cAMP response element-binding protein (CREB) transcription factor and further upregulates downstream Cox-2 gene expression and their downstream effector molecule prostaglandin E2. In D. discoideum, the light-regulated increase in cAMP level affects the starvation-induced developmental process. These PACs could modulate the cAMP levels in a light-dependent manner and have a potential to control gene expression and their downstream effector molecules with varying magnitude. It would enable one to utilize PAC as a tool to decipher cyclic nucleotide mediated signaling pathway regulations and their mechanism.