Diesel? Petrol? Have you checked anything at all? More info would be great. Lots of stuff can cause this. Vacum leak? Check the fuel preassure, fuel trims and check if the temperature sensors are reporting correct temperature.
I had a problem with my Rav not starting when hot, it was the turbo boost sensor part number is 25819-27040, i got a similar one form a breakers yard and it worked fine.