Ogg Vorbis is soup-to-nuts Open Source. Every bit of the Ogg Vorbis specification is available and there are no known patents that apply to Ogg Vorbis. It is often free and easy to work with. (That is, if your platform/framework of choice supports working with it. For instance, XNA/XACT don't support Vorbis, but if you are using XACT you will be giving it your lossless files anyway and using its built-in compression.)
AAC is the product of a working group of corporations with several commercial goals in mind. M4A/AAC is not patent-free, it is patent encumbered:
You don't need to pay patent royalties to use AAC files as a consumer, but if you were to deploy an AAC codec, for instance as a library dependency in a game, you may need to get a patent license and pay for it. (I am not a lawyer. You should talk to a lawyer.) That said, many platforms that you might be working on may already have an existing codec in place. XNA supports AAC in many places, and so does many Apple libraries, as two examples. Developing a cross-platform game with AAC is a bit more difficult (and you may want a lawyer involved).
In terms of "quality", just about every music codec out there is sufficient at a high enough bit-rate. In my experience the "good" bit-rates for normal music listening for Ogg Vorbis and AAC are reasonably similar. I think Ogg Vorbis is a good format and certainly a useful one when you need something open source and free as in beer and speech. (I have a good chunk of my personal music library in Ogg Vorbis, in fact. I like supporting strong open source efforts when I can.)