Contacts can warp the corneas, and so must be discontinued pre-LASIK or LASEK. The amount of time depends on many factors, including the type of lens, fit, your age, how many hours a day you wear them, etc.
The real answer is we do an OrbScan on each and every patient to make sure their corneas aren't warped, once the OrbScan is normal then it's fine, sometimes the scans are normal when they take the lenses out (like their fit is fine and they don't wear them overnight). The problem with lasering a warped cornea is then when it unwarps (after you no longer wear lenses) you'll wind up w some type of residual prescription, i.e. you should only laser a stable fully unwarped cornea.
Also, please note that if you go to a LASIK center and they say your cornea is a bit warped and they can't laser you because they think you may have Keratoconus or KC, you still may be a candidate for the newer, safer, less invasive, non-cutting LASEK that we now do on everyone! This is because you are not destabilizing the cornea by cutting it in half, but are instead gently reshaping the surface, and getting rid of any small amount of irregular astigmatism you might have, also.