Anytime your skin is compromised, there is a chance of surface infection.
However, I assume you are referring to diseases carried by ticks. How long the infection takes to be transmitted depends on the disease. Lyme Disease usually takes more than 24 hours of contact with the tick. Rocky Mountain Spotted Fever can be transmitted in about 6-10 hours. Other less common tick-borne diseases are transmitted rather quickly.