Firstly, specs alone won't answer this: a camera could have a great balance of specs on paper and still be rubbish. You need to look at either reviews or other people's photos and judge the result - and use your judgement rather than take someone else's word for what is good, as tastes vary.
That said, the most important things are the sensor and the lens: if those are poor no processing can save the image. Aperture, sensor size and number of pixels all affect noise levels: aperture and sensor size (plus transparency of the lens and efficiency of the sensor) together determine the total amount of light collected and hence the "shot noise" in the image (fluctuations in the numbers of photons collected - larger sensor and aperture mean more light and so fluctuations are less significant). Number of pixels affects resolution and readout noise: more pixels in principle means higher resolution is achievable but also more noise (which degrades the information). Optimising this lot is a balance, and focussing on any one parameter is misleading (marketing material of course tends to do just that).
And then there is the other big factor: image processing. All images are processed (signals from different channels combined to reconstruct brightness, colours, details, noise reduction techniques applied, possibly HDR algorithms used), and how well or badly this is done is as important as the camera hardware. A large number of pixels plus heavy noise suppression can leave you with less real detail than a smaller number of pixels and better processing, for example. And there isn't a single "optimum" that works for everyone, so manufacturers make choices based on their preferences or what they think will sell well. What are your tastes and who delivers that? Do you hate the sight of noise and prefer everything flattened out, even at the cost of details? Do you like colours to be realistic or exaggerated ("punchy" as reviews tend to call this)? Does oversharpening offend you or do you think it makes images look detailed? There is a slant to those questions which reveals my preferences, but what matters is what your preferences are.
This is why I said at the start that there's no substitute for looking at the pictures taken by a particular model, in a range of lighting conditions, and deciding whether they are good enough for you.