Pili were at least discovered more recently in gram-positive bacteria.
Pili are formed differently in gram-positive and gram-negative bacteria. Here's a pretty good review on the differences: http://www.ncbi.nlm.nih.gov/pubmed/18953686
Researchers seem to think that pili might be involved in adhesion/formation of biofilms (adhesion is important for pathogenicity). Certain types of pili are specifically involved in gene transfer. This is a good review on pili and pathogencity in gram-positive bacteria: http://www.nature.com/nrmicro/journal/v4/n7/pdf/nrmicro1443.pdf. If you can't access it, let me know, and I'll do my best to summarize.
EDIT:
The Wikipedia entry for pilin interprets the second paper I linked as saying that pili are more common in gram-negative bacteria and that pili are implicated in pathogenicity.
Straight from the paper:
Prevalence:
Over the past five decades, several distinct pilus types
have been identified, most of which were described
and characterized in Gram-negative bacteria.
Function:
A common feature of Gram-negative pili, however, is their role in adhesion to eukaryotic cells. It has been
proposed that bacteria use these structures to form an
initial association with host cells, which can then be
followed by a more ‘intimate’ attachment that brings
the bacterium into proximity to the host-cell surface.
and
Pilus-like structures on the surface of Gram-positive
bacteria were first detected in Corynebacterium renale,
by electron microscopy. More recently, surface
appendages were reported to be present in Actinomyces naeslundii
and were subsequently found in other
species, including Corynebacterium diphtheriae, Streptococcus parasanguis (Streptococcus parasanguinis), Streptococcus salivarius
and Streptococcus sanguis (Streptococcus sanguinis). Finally, in the past
year, pili were also characterized in all three of the
principal streptococcal pathogens that cause invasive
disease in humans — group A Streptococcus (GAS; that
is, Streptococcus pyogenes), group B Streptococcus (GBS;
that is, Streptococcus agalactiae) and Streptococcus
pneumoniae — in which they have been shown to
have key roles in the adhesion and invasion process and
in pathogenesis. [emphasis added by me]