DVI will always be better.
VGA cables are analog signals and have a maximum resolution at 800×600, while HDMI are digital signals and have a maximum resolution of 2048×1152. Though it would take much less bandwidth to send an HMI signal (both content and commands) than it would to send a VGA signal, the frame data rate is equalized over both types of connections. This means that because we can cram more data into each millisecond for HMI graphics than with VGA graphics, many high-end video cards ship with HDMI/DVI connectors in addition to standard VGA connectors and let you switch how displays see your output from one type or another. If your monitor only accepts analog inputs and you want to use digital ones, then all is not lost: You can purchase an analog-to-digital converter that plugs into your computer and plugs into your monitor/TV. As long as you’re at it, why not just go the whole way and get a DVI->HDMI cable? They’re cheap, effective, and may give you greater image quality than VGA connections.
VGA is analog, HDMI is digital.