Yes, CyberGhost is legal to use. Take note, however, that some countries will have restrictions or even ban its use. In addition, keep in mind that while CyberGhost itself is legal, doing criminal acts or visiting sites that your government has banned is illegal.
VPNs like CyberGhost are legalized to prevent hackers and cybercriminals from accessing your private data. However, doing anything remotely close to these offenses while using the VPN would be punishable.