Does sexual dimorphism exist in Heterodontosaurus specimens? The tusks may be a good indication of sexual dimorphism if many more specimens of varying ages (developmentally not geologically) are recovered. Tusks in extant animals, in addition to serving dietary and defensive purposes, are sometimes used to differentiate between sexes. Males with bigger tusks could be seen as older, fitter, or just more handsome in general to the females that are usually impressed by such ornamentations. The tusks of Heterodontosaurus are not enormous though they are a decent and respectable size for a dog sized ornithischian. In a range from warthog to walrus they are much closer to warthog sized teeth. Their position in the skull allows them to have been used in intraspecific rivalries, interspecific fighting, and even to crack open the tougher staples of the Heterodontosaurus diet such as termite mounds.
The skull even appears to have adapted to seating the tusks within the mouth, mostly, as opposed to the way tusks in most extant animals are situated. Picture a walrus or a warthog, even an elephant's tusks and how they protrude from the skull and mouth in a way in which they are never actually concealed by lips, cheeks, or any other fleshy anatomy. The tusks of the Heterodontosaurus were modest enough that they could have been concealed within the cavity of the cheek provided it was stretched that far forward on the skull. Those little tusks even appear to have a position within the junction of the maxilla and premaxilla to accommodate them. Biting down on something seated in that notch with the tusk piercing it from the other side could have caused great trauma, to the limbs of other animals especially, or destruction, in the case of the termite mounds mentioned before. There would have been great risk to the Heterodontosaurus itself, however. Much like any other animal with a tusk it risked breaking the tusk when using it for any activity. Unlike mammals, however, dinosaurs have batteries of teeth, so it is plausible, though perhaps unknown at this time to my knowledge, that the tusks of Heterodontosaurus could have been regrown if broken.