# Haskell, <s>109</s> <s>98</s> 96 bytes

Thanks to nimi and Mauris for their help!

    0#0='O'
    0#_='-'
    _#0='|'
    i#j|i==j='\\'|i== -j='/'|1<2=' '
    f n=unlines[map(i#)[-n..n]|i<-[-n..n]]

**Explanation:**

The operator `#` specifies which character appears at coordinates (i,j), with the sun centered at (0,0). Function `f` builds the result String by mapping `#` over all pairs of coordinates ranging from -n to n.

**Usage:**

    ghci> putStr $ f 2
    \ | /
     \|/ 
    --O--
     /|\ 
    / | \