The NOAA Diving Manual has a chart called "Minimum Surface Interval Time Before Ascent To Altitude." It will give you the aggressive answer to your question about how long you need to wait, depending on your NOAA/NAVY repetitive dive group.
The conservative answer is given by the various training agencies and by DAN (Diver Alert Network). Your previous scuba instructor would be able to give you the specific general guidelines of the agency (YMCA, NAUI, PADI etc) that issued your C-card.
DAN publishes their advice in their Alert Diver magazine. This issue comes up at least once a year.
If I am pressed for time, I go to the NOAA chart.
Otherwise, I normally wait 24 hours, a full day at the resort, during which I do not scuba, before I get onto a plane. For deco dives, I wait 48 hours. But that is just me, wanting to be really safe.
I like to spend my last day at a diving resort swimming and freediving, no scuba. Its also a good day to let my equipment dry out completely before packing it.