One cause could be interference. I was at a house the other day with similar problems; the ping was all over the place. I did a scan with Netstumbler
stumbler dot net and 3 of the neighbours were on the same channel (6). I moved it to channel 11 and all was fine. You should only drop about 1-3ms on the ping through you wireless network.
Good luck
Dale