So I have 5 kids, and only 4 of them got imaginary friends, the first one didn't. Apparently there is a 75% chance that you get it.
The four who did get it also got the opportunity to "make Dreams Come True" with a rainbow gem to the science centre. The science centre makes a potion at which point you go back and dole out 4500 simoleons. I have one sim doing that now (she's actually an young adult by this point and she still can play,converse, and romance with "Puzzle" (it came with that name and I liked it)) Once you pay up you get the "Imaginary Friend Metamorphium" potion and an option to give it to your 'friend'. Swirling lights and special effects later it turns into a real person (male or female depending what you have chosen) and gets added as a playable sim to your household, at the same age as your sim who's friend it was. She/He shares your last name though isn't a member of the household.
This was with the rainbow gem, my next plan is to get the potion with the chemistry table. (wish I had taken pictures... oh well)