Theoretically speaking, in Minecraft you can mine pretty much anywhere to get the resources you want- the resources you need- to support yourself and progress in the game. In truth, though, there are better and worse places to put your mine, each for its own reasons. When you go to start mining, you’ll want to keep in mind what you want out of your mine, what is close to your home base, and what is safe.
Coal, for instance, can be found all over the place underground. But if coal is all you need, your best bet is to do a lot of shallow digging in Swamp areas. Swamps often have a lot of coal near the surface, and the relative lack of sand means that you have a lot less worries about falling material landing on either you or what you have dug up. However, when you are digging in a swamp, if you go to any depth you need to be very careful about digging up and even horizontally. Swamp areas have a lot of shallow water on the surface and the ground underneath it often slopes strangely. It is extremely easy to flood your dig when you are digging in a swamp, so you will need to go slowly and carefully.
Digging in a mountain is far safer from falling objects- but many mountains hide ravines or tunnels under them, some even being full of water. It is very easy to suddenly fall while digging in a mountain. Additionally, if you dig the wrong direction, you might find yourself suddenly stumbling out of a cliff face and into a very long and painful fall.
Digging beneath most other land is relatively safe from falling, but you are far more likely to find lava and underground water sources, so you’ll need to keep your eyes sharp and your digging slow enough that you don’t wind up staggering around on fire. Even the best of Minecraft players sets themself on fire now and then, but anything you can do to reduce these chances is good.
Of course, digging beneath the water is possibly the most rewarding, as you have less digging to do in order to reach the lower depths- but any mineshaft you construct is in constant and high danger of flooding, so you’ll need to be ready to swim against a current- and you’ll need to remember exactly where you reached the sea floor so that you don’t dig up in the wrong place.
That said, finding a spot to dig in is fairly easy. Ravines can be anywhere, and having a lot of excavation work done for you will always make things simpler- the same can be said of caves. On the other hand, there’s an element of exploration (and dwarf-iness) to digging in a place where nothing has been done yet.
Really, the best thing to do for your mine is to place it reasonably close to your home, so that you can return to it whenever you feel you need to. It’s the specifics of the location that matter more than the generalities, after all.
Placing your mine in your home can be advantageous, in that you don’t have to risk going outside at night no matter when you feel like you are done mining or ready to start mining. It does carry some risk of monsters showing up in your home, but that can be alleviated by installing a simple door- remember, monsters don’t manipulate objects, ever.
Finding a small valley or hole very close to your home, especially if it’s at the base of a large mountain, is usually the best way to ensure your mine is in a place where you can get to a lot of resources. Ravines seem to be more common beneath mountains (though I don’t know the programmed variables there), and having the mountain over your mine will usually make it easier to protect the entrance from having unwanted monsters drop in while you are deep in the mine or away from it entirely. Try to avoid digging right next to water sources unless you really want to be able to flood your mine for some reason.
If you can find a location where some ore or coal is already exposed, then you’re in good- veins and pockets of valuables are a bit more frequent to find next to other veins and pockets, though there are ways to increase the likelihood even more.
In the end, it isn’t a huge issue where you wind up placing your mine, but putting a little thought into it can easily find you a spot that is better for you- be it for access or safety.