Yes, it is 100 per cent safe to delete the groups.cache file from your My Documents--EA Games--The Sims 2 folder. Deleting it periodically can solve a myriad of problems, as the file can become bloated or even corrupted over time.
The game will create a new groups.cache file automatically.
Short explanation of what it is and does here:
http://www.modthesims2.com/showthread.php?t=75565