When a person spends a long time outside especially if it is very and they sweat a lot they can get a heat rash. Usually the rash has fever and is very patchy.
It depends where you have been. It could be sunburn if you weren't wearing sunscreen, or it could be poison ivy if you were doing yard work with extensive foliage.
The sun is hot, it can burn your skin. That's why too much exposing of your skin under the heat of the sun can cause rashes. Imagine your skin being burn, it will give you very uncomfortable feeling.