The exponential increase of patients with diabetes mellitus urges for novel therapeutic strategies to reduce the socioeconomic burden of this disease. The loss or dysfunction of insulin-producing beta -cells, in patients with type 1 and type 2 diabetes respectively, put these cells at the center of the disease initiation and progression. Therefore, major efforts have been taken to restore the beta -cell mass by cell-replacement or regeneration approaches. Implementing novel therapies requires deciphering the developmental mechanisms that generate beta -cells and determine the acquisition of their physiological phenotype. In this review, we summarize the current understanding of the mechanisms that coordinate the postnatal maturation of beta -cells and define their functional identity. Furthermore, we discuss different routes by which beta -cells lose their features and functionality in type 1 and 2 diabetic conditions. We then focus on potential mechanisms to restore the functionality of those beta -cell populations that have lost their functional phenotype. Finally, we discuss the recent progress and remaining challenges facing the generation of functional mature beta -cells from stem cells for cell-replacement therapy for diabetes treatment.