Both, according to the Oxford Minidictionary of First Names.
"As a boys name this is from a surname of Irish origin, derived from an old Irish personal name RUADHAN. Alt RONAN; cf ROY.
As a girls name it is taken from the name (of Scandinavian origin) of the tree".