Legit, in the time it took me to come to this topic, Bri beat me with an answer :') But there is something I want to add:
While Bri's answer is fantastic, you might notice that it relies on scientific literature from 2016 - that's REALLY REALLY recent. Here's a list of some of the other things you have learned/will learn this year (assuming you're in year 12?) and when they were discovered:
Equilibrium - 1803
Galvanic Cells - 1790
Bronsted-Lowry Acid-Base Model - 1923
The pH Scale - 1909
Le Chatelier's Principle - 1884
NMR - 1945 (was awarded the Nobel prize in physics in 1952, neat)
Markovnikov's Rule - 1869
...
I think you get the point. You're studying old shit (the most recent of these is over half a century old!!) - and it's a little unreasonable for you to be read up on current-day research. But aside from that, there's something to note - a lot of what you're studying in your curriculum and textbooks ISN'T informed by current-day research. Solubility is a big one of those.
The truth with solubility is that in general - we DON'T know how it works. We can make guesses, such as why are silver halides insoluble if halides are typically soluble? Well, it would be because silver cations are insoluble. But wait - then why are silver cations insoluble? Well, the answer is going to be in one of:
-Silver-water interaction energy
-Silver-halide interaction energy
-The entropy of a silver-dissolved system (everything is soluble if you get it hot enough, even if that means taking it to infinity degrees)
The question is - which one? And the answer is typically - we don't know, but we can use one of these things to figure it out:
-Equilibrium constants
-Electrochemical potentials
-Actual chemical reactions that might take place (eg, metal oxides that are typically insoluble will be dissolved if you add enough acid, because the acid actually causes the oxides to chemically turn into water)
But all of these are typically just consequences of one of the above three things - interaction energy (or enthalpy) of one of the complexes, or the entropy of the system.
TL;DR - the answer to most solubility questions is basically, "we don't know, the answer is complicated", and hence why we need modern-day research like the article that Bri found to inform these kinds of questions. So, you shouldn't expect to be asked these questions at high school level (unless your textbook can offer you an answer) - but if you're interested for the sake of pure interest, then go nuts - I'll be the last person to discourage reading scientific literature for the fun of it.
EDIT: See below for Bri showing me up with my QCE knowledge
. So yeah, turns out NMR isn't in the curriculum, oops. And I was unaware that QCE has a research investigation - looks damn cool though, I gotta say!