If you're a beginner, you should probably start with those formats. (Or maybe MD3, which comes after MD2.) Newer 3D formats don't typically supercede old ones by being objectively better, but usually by supporting more complex features. I'd recommend not making life difficult for yourself by picking a complex format.
If you're not a beginner, then you probably wouldn't be asking this question. ;) Professional developers usually have a bespoke model type that is specific to the engine they're using.
If you have specific requirements for your models then it's possible that there exists a model format that fits your needs, but MD2 and MD3 worked fine for commercial games so they'll probably work fine for you too. Generally you should approach this from the other side - what sort of models can my artists create, or what sort of models can I obtain? What format are they in? Can I use that format?