The best basketball game is NBA2k12 and there isn't even any competition. It's arguably the best sports game ever made, period. I say that while basketball is not my favorite sport and I don't watch the NBA.
As far as baseball goes, if you have a PS3 I know that MLB 12: The Show is considered to be the best baseball game ever made, and also the most sim-like (not as many goofy overlays for things like pitching and batting).
That's about all I can tell you specifically man. If you're a PC-only gamer, then the only modern baseball game available is MLB 2k12 which is not nearly as good as NBA 2k12, nor is it as good as The Show.