How do I regain my iTunes ratings and playlists?
You don’t mention by what means you transfered your music to the new computer so I don’t know if this will help or not but I’d recommend reviewing this page from apple that specifically addresses your use case, that is, How to move your iTunes library to a new computer. 

https://support.apple.com/en-us/HT204318

If you still have access to the “old” computer you may want to follow the directions on the above link.

I also found this page, about your itunes library files, may also shed some light on the missing ratings and playlists.

https://support.apple.com/en-us/HT201610