Both of them mean the condition of "absence of light". But "Buio" is mostly used for a fiscal description, while "oscuro" can have also a negative connotation and is often used to personality characterization.
For exemple you will say:
The dark Knight, in a dark night = Il cavaliere oscuro, in una notte buia