While some cast members, like David Hasselhoff, were known to sing, they were not the ones performing the majority of the songs heard on the show.
The music was usually licensed from existing artists and bands. The show often used popular songs of the time to fit the mood of a scene or to create a certain atmosphere.