It is possible that exposure to sunlight or spending time in a warm environment can cause hives in infants. Keeping track of when the hives appear and any potential triggers, such as after meals or baths, can help identify the cause. Consult with a healthcare professional if necessary for proper diagnosis and treatment.