The surname Dunn can have several different origins.
It could have come from the Irish surname of O'Duinn, which literally means 'The grandson of Donn'. Donn means 'brown haired.' So someone with this surname would be the grandson of someone with brown hair. In Ireland the name is usually spelt like 'Dunne'.
This has links to the other possible origin of Dunn, which is from Middle English and means 'dark coloured'. This could be reference to someone with dark hair or dark skin. It would have firstly been a nickname for someone with these characteristics before developing into a surname.
Lastly the name could have links to where someone lives. This is known as a locational surname, as a person is literally named after where they live. In this case people of come from the lands of Dun in Scotland. Deriving from the Scottish 'Dun', which means fort.
The first spelling of this name was found in 1102 with the spelling 'O'Duinn' in the Ancient Irish Records. This is close to the time when surnames became a necessity due to tax reasons.