This is the answer from wikipedia:
" music was a huge part of the series. A large reason for its popularity was the catchy theme song "Hi Ho Silver" which was written and recorded by Jim Diamond, who was by that time famous for his Number 1 hits "I Won't Let You Down" and "I Should Have Known Better". It was so popular with fans that it was released as a single in 1986 and reached number 5 in the UK charts. Most of the episodes however, didn't end with the theme song, many of them ended with country and western songs such as "Handsome Stranger" and "Texas Rangers", written for the series by Dean Friedman. Friedman wrote the incidental music and songs from series 2 through to the end of the show. The incidental music for the first series was provided by Barrington Pheloung.