As mentioned by creeon, it is much more likely that horns would develop for mating purposes. Horns used for defense require you, as a prey animal, to be within striking distance of a predator with presumably sharp claws and/or a large set of powerful jaws.
Even worse, the horns are on your head! To even use defensive horns, your neck must be that much closer to jaws that wish to close around your neck. Not to say it isn't plausible, but the most parsimonious answer would be that of sexual selection.
The evolution of numerous behavioural and physiological traits throughout the animal kingdom are due to sexual selection. Darwin even defined and described it in 'The Descent of Man, and Selection in Relation to Sex'. Not only that, sexual selection pressures are often powerful enough to produce features that are harmful to the individual's survival! The most flagrant example being the peacock's tail — an ostentatious but quite impressive display that is most definitely a hindrance when escaping from a predator. This type of extreme sexual selection is an example of a Fisherian runaway - exaggerated male ornamentation by persistent, directional female choice
Horns on a primate might be sexually selected for any or all of the following reasons:
wrestling aids to assert dominance and implicitly display fitness to potential mates. These would tend to be bigger and more intricate like a deer or other cervid's horns to bind your opponent, much like an ice hockey fight where the goal is to hold your opponent with your free hand to prevent them sliding away.
headbutting 'helmets' like the above pic to assert dominance and implicitly show fitness, much like rams or muskox. These would tend to be flatter and would likely be fused directly with the cranium to cushion the skull.
no wrestling involved, horns are merely an 'honest signal' (i.e. no presumption being made of conscious intention) of fitness or some other, more granular positive trait that a mate would want their offspring to have.
It is also not likely that monkeys over apes would develop horns - all primates are social, with varying degrees of gregariousness. The most intraspecies mate competition would lead to the strongest sexual selection pressure for horns, but both monkeys and apes show enough mate competition to get the selection pressure started.
further reading on the evolution of horns: The Evolution of Horn-Like Organs (V. Geist)
(would post more links but this is only my first answer on the site)