Freckles and pigmentation from sun exposure do develop from the same mechanism, which is an increase in the darker pigment melanin. People with very fair skin (and red-heads) have skin that is more sensitive to the sun and they form freckles very quickly from sun exposure. Freckles also has a genetic link but it takes exposure to UV-B radiation from the sun to cause them. It is very rare to be born with freckles. Pigmentation can also develop from other causes other than UV-B exposure such as hormonal causes (like pregnancy), or as a result of inflammation.