Hi!
Peak detection of an AC signal is a part of my current project. For accurate peak detection of an AC signal in software first you have to convert the AC to DC by using a bridge without any filter capacitor because the filter capacitor will deform the shape of the AC signal. The second step is to scaledown the signal to a maximum of 5V swing (within the range of PIC ADC).
After all this you have to sample the input signal at a good sampling frequency i.e about 2KHz. Compare each sample result to the previous sample to determine the maximum value of the signal which will be the peak.
All this stuff can be done quite easily in hardware (opamps).