What brand and model of monitor and what type of connectors does it have?
PowerMac G5s did not ship with a monitor but you could use several Apple monitors of the time plus common third-party monitors like Sony, ViewSonic, etc. However, the type of video connection varies, even on Apple monitors. So we would need to know what connectors (or at least make/model) to research the required adpators.
If you are asking about a G5 iMac----looks like this:
Then, no, it cannot be used as an external monitor in the traditional sense. You may be able to use third-party, screen-sharing software if both computers are networked. See here:
http://www.screenrecycler.com/ScreenRecycler.html
It appears the software still supports older Macs.