Either your wireless AP or your clients have a bug in how they're handling the WPA2-PSK group (multicast/broadcast) keys. Because of this, ARP broadcasts aren't getting through from one client to another. Without ARP, they can't learn each others' wireless MAC addresses, so they can't address the 802.11-layer headers of the ping frames.
Enter static ARP mappings between two machines and see if they can ping each other -- I'll bet they can.
If you enabled WPA2 "mixed mode", where both WPA[1]-style TKIP and WPA2-style AES-CCMP are both enabled, see if your problem goes away when you switch to pure WPA2 (AES-CCMP only). Hopefully you don't have any TKIP-only clients that this excludes. Mixed mode is a little tricker than pure WPA[1] or pure WPA2, because it requires a TKIP group key but AES-CCMP pairwise (per-client unicast) keys.
Make sure your AP's firmware and your client machines' OS, wireless software, and wireless drivers are full up to date, in case your vendors have fixed their bugs.
Make sure to buy Wi-Fi certified equipment. Look for the Wi-Fi certification logo. This is why the Wi-Fi Alliance exists, to make sure that 802.11-based products follow the specs correctly and interoperate properly.
What error do you get? Are you pinging by name or IP address? – SLaks – 2010-03-28T16:48:41.753
what are their IP addresses and subnet masks? – David Fox – 2010-03-28T17:04:19.267
Error I get while pinging is "destination host unreachable" – Judah Himango – 2010-03-28T17:30:23.103
My IP address is 192.168.0.100, other machine IP address is 192.168.0.102 (and the other machine is .104) – Judah Himango – 2010-03-28T17:30:46.833
If you ping the IP Address, what happens? – SLaks – 2010-03-28T17:47:57.273
That's what I tried. Pinging the IP address of another machine results in "destination host unreachable". – Judah Himango – 2010-03-28T17:53:10.553