I have a rash on my chest that gets sore when exposed to hot water or direct sunlight. Could it be a yeast infection?

Could be, or . could be something else, many active skin inflammatory conditions can cause this, with the scant information you gave we cannot make a sensible judgement other than ask you to see a dermatologist , you can start with your doctor for initial assessment and possible referral, good luck.