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 β-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 β-cell mass by cell-replacement or regeneration approaches. Implementing novel therapies requires deciphering the developmental mechanisms that generate β-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 β-cells and define their functional identity. Furthermore, we discuss different routes by which β-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 β-cell populations that have lost their functional phenotype. Finally, we discuss the recent progress and remaining challenges facing the generation of functional mature β-cells from stem cells for cell-replacement therapy for diabetes treatment.