Sexual dimorphism--a difference in size and appearance between the adult males and the adult females of a given species, apart from their genitalia--is a common occurrence in the animal kingdom, including dinosaurs. It's not unusual for the females of some species of birds to be larger and more colorful than the males, for instance, and we're all familiar with the giant claw of the male fiddler crab.
When it comes to sexual dimorphism in dinosaurs, though, the evidence is much more uncertain. First, the relative scarcity of dinosaur fossils--even the best-known species are usually represented by only a few dozen skeletons--makes it perilous to draw general conclusions about the relative sizes of males and females. And second, bones alone don't have much to say about secondary sexual characteristics, much less the actual sex of the dinosaur in question.
Female Dinosaurs Had Bigger Hips
When it comes to distinguishing between male and female dinosaurs, paleontologists can consult one distinctive feature: the size of the skeleton's hips. The females of large dinosaur species like Tyrannosaurus Rex laid relatively large eggs, so their hips were configured in a way to allow for easy passage (in an analogous way, the hips of adult human females are wider than those of males, to allow for easier childbirth).
Oddly, T. Rex appears to have been sexually dimorphic in another way: many paleontologists now think that the females of this species were significantly larger than the males. What this implies, in evolutionary terms, is that females competed for the right to mate with available males, and may have done most of the hunting as well. This contrasts with modern mammals like the walrus, in which the (much bigger) males compete for the right to mate with smaller females.
Make Dinosaurs Had Bigger Frills
Tyrannosaurus Rex seems to be one of the few dinosaur species whose females asked (figuratively, of course), "Do my hips look big?" Lacking extensive fossil evidence about relative hip size, scientists have no choice but to rely on secondary sexual characteristics--which, as mentioned above, don't tend to be preserved well in the fossil record.
Protoceratops is a good case study in the difficulty of inferring sexual dimorphism in long-extinct dinosaurs. Some paleontologists believe that the males of this ceratopsian had larger, more elaborate frills on the backs of their heads, which were used as mating displays (fortunately, there's no shortage of Protoceratops fossils, meaning there are a large number of individuals to compare). Lacking more evidence, though, other scientists are unconvinced.
Lately, much of the action in dinosaur gender studies has centered on hadrosaurs, the duck-billed dinosaurs, many of which (like Parasaurolophus and Lambeosaurus) were characterized by their large, ornate head crests. As a general rule, male hadrosaurs seemed to have differed in size and appearance from female hadrosaurs, though of course the extent to which this is true (if it's true at all) varies on a genus-by-genus basis.
Sometimes, Gender Can Be Hard to Determine
As stated above, one major problem with establishing sexual dimorphism in dinosaurs is the lack of a representative population. Ornithologists can easily collect evidence about hundreds of males and females of a single bird species, but a paleontologist is lucky if his dinosaur of choice is represented by more than a handful of fossils.
Lacking this statistical evidence, it's always possible that the variations noted in dinosaur fossils have nothing to do with sex: perhaps two different-sized skeletons both belonged to males from widely separated regions, or perhaps dinosaurs simply varied individually the way humans do. In any case, the onus is on the researcher to provide conclusive evidence of sexual differences; otherwise we're all just fumbling in the dark.