I suppose I should start with the basics. Competitive pipe bands are graded from grade 5 (the lowest) to grade 1 (the highest). The musical requirements change with the grades so that at grade 5, you play a quick march medley of about 2:30, whereas grade 1 bands have to provide a selection of three MSR (march-strathspey-reel) sets and two medleys, of which the judges will pick one of each (usually by blind draw at the line). The lowest grade 5 bands can be pretty bad. The best grade 1 bands are world champions. Listen to a few of each, compare the sound, and anyone can hear the difference.

I would disagree with your statement that "many/most bands are graded". I think on the contrary that most bands don't compete, and are just parade bands. There are certainly more parade bands, of varying qualities, than competition bands, at least in my area. One of the most traumatic things for a band can be the move from just being a "beer and pretzel" band to competing, because there's a change in the level of dedication involved. That's not to imply that there's anything wrong with being a good street band, by the way, as not everyone enjoys competition.

Soloists, by the way, are graded from grade 4 (both junior and senior, depending on age) to grade 1 amateur. Above that is "open", which is professional, and consists of the best solo players. As far as I can tell, that means the winner not only gets a medal, but a medal plus $100! In the United States, we only have one system, which covers both light music and ceol mor. In Scotland, I believe soloists are rated separately in each.

In both bands and solos, there isn't any set music that must be played, though there are set types of tunes that must be played (i.e. an MSR, or a 6/8 march in a 6/8 competition, or a hornpipe and jig in a competition for that, etc.). At the lowest levels, you just tell the judge what you'll be playing. When you get to higher grades, you give them a list of tunes you'd like to play, and they pick. The higher you go, the more options you have to give. Also, generally, the more difficult the tunes you offer up should be. In Grade IV Senior, you should almost certainly not be saying, "Sir, I will be playing 'The Highland Wedding'."

Soloists are judged on their execution, musicality, tuning, steadiness, and suchlike. Again, listen to a Grade IV competition, then listen to an Open competition, and you'll hear the difference. Bands are a bit more complicated. Usually two judges judge piping, based on the same sort of things as soloists, plus unison and band tone, one judge handles the drums, based on criteria that are a mystery to me, a non-drummer, but involve execution, timing, and the like, and a fourth judge judges ensemble, which is how the pipes and drums play together, and the overall musical effect, with special emphasis on the mid-section (the bass and tenor drums) and their contribution to the band sound.

Musicality is important, and it's the reason that judges are always people who have played to a very high level. Listen to enough competitions, and you'll notice that especially at the lower levels, people play too slowly, and, as someone once put it, "play marches no one can march to, and strathspeys and reels no one could dance to."

Anyway, all these criteria are checked off, comments added, and by some magical formula, the judge comes up with a score out of 100. The one with the highest score wins.

I don't know if that is helpful, or answers all your questions, but there you go.