Circadian rhythms are endogenous, entrainable oscillations of physical, mental and behavioural processes in response to local environmental cues such as daylight, which are present in the living beings, including humans. Circadian rhythms have been related to cardiovascular function and pathology. However, the role that circadian clock genes play in heart development and function in a whole animal in vivo are poorly understood. The Drosophila cryptochrome (dCry) is a circadian clock gene that encodes a major component of the circadian clock negative feedback loop. Compared to the embryonic stage, the relative expression levels of dCry showed a significant increase (>100-fold) in Drosophila during the pupa and adult stages. In this study, we utilized an ultrahigh resolution optical coherence microscopy (OCM) system to perform non-invasive and longitudinal analysis of functional and morphological changes in the Drosophila heart throughout its post-embryonic lifecycle for the first time. The Drosophila heart exhibited major morphological and functional alterations during its development. Notably, heart rate (HR) and cardiac activity period (CAP) of Drosophila showed significant variations during the pupa stage, when heart remodeling took place. From the M-mode (2D + time) OCM images, cardiac structural and functional parameters of Drosophila at different developmental stages were quantitatively determined. In order to study the functional role of dCry on Drosophila heart development, we silenced dCry by RNAi in the Drosophila heart and mesoderm, and quantitatively measured heart morphology and function in those flies throughout its development. Silencing of dCry resulted in slower HR, reduced CAP, smaller heart chamber size, pupal lethality and disrupted posterior segmentation that was related to increased expression of a posterior compartment protein, wingless. Collectively, our studies provided novel evidence that the circadian clock gene, dCry, plays an essential role in heart morphogenesis and function.