We show how the two-dimensional Dirac oscillator model can describe some properties of electrons in graphene. This model explains the origin of the left-handed chirality observed for charge carriers in monolayer and bilayer graphene. The relativistic dispersion relation observed for monolayer graphene is obtained directly from the energy spectrum, while the parabolic dispersion relation observed for the case of bilayer graphene is obtained in the non-relativistic limit. Additionally, if an external magnetic field is applied, the unusual Landau-level spectrum for monolayer graphene is obtained, but for bilayer graphene the model predicts the existence of a magnetic field-dependent gap. Finally, this model also leads to the existence of a chiral phase transition.