It was almost certainly written especially for the TV series.
I'm pretty sure the legendary Danny Lux wrote the theme. I think he might have also written the theme for series 1-3.
These clips are from the Sitcoms Online website - worth checking out.
Opener: http://www.sitcomsonline.com/sounds/sabrinatheteenagewitchwb.wav
Closer: http://www.sitcomsonline.com/sounds/sabrinatheteenagewitch-2000ending.wav
Sitcoms Online has also got the short-lived and very 90s-sounding Series 4 theme, which I can barely remember...is not as upbeat as the Sabrina themes that both preceded and succeded it
http://www.sitcomsonline.com/sounds/sabrinatheteenagewitch1999.wav
And here are the lyrics for both Season 4 and 5:
SEASON 4 LYRICS
Secrets
Your never gonna learn
Your never gonna guess (nah-nah-nah nah nah nah nah)
Secrets, Secrets, Secrets
SEASON 5 LYRICS
Life's changing around me and I'm gonna make it mine.
I'm reaching out and living by my rules.
Times moving way to fast. I want to make it last
Because I'm all on my own now and I like the way it feels.
Taken from http://www.cfhf.net/lyrics/sabrina.htm