Sorry for taking so much time to answer. I saw what Airship804 posted, but I just could not find enough time to test it. I was in the middle of a project that was taking pretty much all my spare time. Now things are starting to calm down a little bit, so I decided to check it out. Not that I needed though. It seems that Etch has already done all the checking we needed using the real hardware

Anyway, my mother always told me to never trust a guy with 6 GBAs. Specially one that is able to get the legendary 4 star ranking. So, I decided to check it myself.
Airship804 was totally right! The "unknown value" does indeed change when you get hit by lightning! Thank you so much Airship804!!!
And you guys were totally right, the reason I never saw it change before was because the AI seldom uses the lightning bolt. Specially against a player that is in the last place, has been lapped a couple of times and is hitting his head against a wall while throwing green shells at himself.
In the matter of fact, the AI barely uses lightning bolts period. When I am in the 1st place I am gifted with tons of red shells and a few ghosts. Sometimes when I am near someone the fella may use a star. But lightning bolts??? No sir.
It took me some hours to get "lucky" enough to be struck one single time! And that has taken almost all my free time.
What we know for sure now is that if you got hit by lightning, that unknown value will be set to 1. What remains to be tested is that if it is incremented on each new hit. I am assuming it is, but I just do not have enough free time to test it right now.
In any case, I have submitted an updated version of the FAQ to GameFaqs where I replaced "unknown value" by LightningHits.
I am also going to take the chance and update the quick colored guide I posted here.
PS: I've been lurking here from time to time seeing the crazy stuff Etch has being doing and I would just like to say that I think it is awesome. Too bad the GBA does not help very much, because I would love to see high quality videos of all that.
// The SkillPoints
//
// NOTICE: I will be using a C language notation for the SkillPoint calculation
// formula below. Math people usualy cringe when they see it, because stuff like
// x = x + 1 not only valid, but it is very very common. Anyway, it is very
// simple to understand: what is on the left side of the = sign receives the
// result of the operation on the right side. That is it. Simple as that. So
// x = 1 + 2
// means that the value of x is now 3, because the result of the operation on
// the right side, 1 + 2, is 3. Also
// x = x + 1
// means that the value of x is now whatever value x had plus 1. This kind of
// operation is used a lot. It is used so much that the C language guys created
// a little "short cut" for it, which consists in placing the operator just
// before the = sign, like this
// x += 2
// which means that x now have whatever value it had, plus 2, and is the same as
// x = x + 2
// If change the operator, the operation changes (obviously), so
// x -= 2
// means that x now have whatever value it had, minus 2. All the conventional math
// rules apply so
// x += -3
// is the same as
// x = x + (-3)
// which is the same as
// x = x - 3
//
// Well, that is it for your quick C language tutorial. It is pretty easy to
// understand, and it is the notation I will be using below. But have no fear of
// raising your hand and asking me a question, if you do not understand it yet.
// I will try to explain it again as best as I can. So... time to carry on.
//
// The stats above are tracked during a race and then, right when you cross the
// finish line, the game calculates what I am going to call SkillPoints. The
// higher you SkillPoints the better. Some stats increment those points, and
// some decrement them. I think it is pretty clear which is which, but what is
// not clear is by how much they increase or decrese those SkillPoints. I mean,
// what WAS not clear, because here we go:
// the skill points for the track aways start at zero.
SkillPoints = 0;
// add the position points
SkillPoints += PositionPoints;
// yes coins ARE important 
SkillPoints += Coins * 4;
// number of times you where struck by lightning bolts.
// Thanks to Airship804 for the hint! And Etch for testing it! You guys rock!
SkillPoints += LightningHits * 40;
// if the sum of all your lap times is greater than 59999 (9 minutes, 59 seconds
// and 99 cents), it is set to 59999. Also, if the result of the whole calculation below is less
// than 0 it is set to 0. That means that you lap times MIGHT increase your
// skill points, but they WILL NEVER decrease them.
SkillPoints += ((ccWeight * TrackValue) - (LapTime1 + LapTime2 + LapTime3 + LapTime4 + LapTime5)) / 8;
// you picked Bowser? Good for you!
SkillPoints += CharacterEndRaceValue;
// if you need to stop hitting the gas, be quick about it
SkillPoints -= FramesNotHittngGas / 4;
// unless you hit a banana, take you feet of the brake pedal. It will hurt your
// hard earned skill points bad. I am one of the worst MKSC players out there
// and even I have no need for brakes
SkillPoints -= FramesHittingBrake * 2;
// fortunately you will only get these items when you are not in 1st.
SkillPoints -= Item3RedSheelsUseCount * 5;
SkillPoints -= ItemStarUseCount * 30
SkillPoints -= ItemLightningUseCount * 5;
// Lakitu is NOT your friend
SkillPoints -= LakituRescueCount * 30;
// thy shall hit no one! Nor anything!
SkillPoints -= EntityHitCount * 15;
// Bowser Castle levels can be harmful
SkillPoints -= WallHitCount * 20;
// So KartSeven, what did ou say? That princess hitting me with 3 dozen red shells
// per lap would not take my 3 star rank away? Was that it? hehe
SillPoints -= GotHitAndSpunCount * 15;
// retrying does not automaticly take away your 3 star rank. Well... in theory.
// (3 - RemainingLifes) is how the game calculates your retry count. If you
// never retried, it will be 0 (you start with 3 lifes, remember?)
SkillPoints -= (3 - RemainingLifes) * 120;
// thy shall master the start miniturbo. When Lakitu rescues you, doing a
// miniturbo when he puts you back on the track ALMOST takes alway the
// SkillPoints you just lost
SkillPoints += StartMiniturboCount * 25;
// no surprise here
SkilPoints += DriftMiniturboCount * 15;
// well well well... Look what we got here!
SkillPoints += ItemBoxHitCountWhileFull * 15;
// I just wish the game would differentiate between being outside the track and
// being on water spots in the middle of the track on the beach races.
SkillPoints -= FramesOutsideTrack / 4;
// Rank
//
// your final rank is pretty simple. The SkillPoints are calculated for each of
// the 4 tracks, then we take the arithmetic mean and compare it to a couple of
// fixed values
Rank = (SkillPoints1 + SkillPoints2 + SkillPoints3 + SkillPoints4) / 4;
// now, if you got the first place on all 4 tracks...
if Rank > 329 then ***
if Rank > 199 then **
if Rank > 99 then *
if Rank > 29 then A
// if not, then he game checks if you made at least 27 points
if Rank > 329 then **
// not even 27? Please tell me you made at least 21...
if Rank > 329 then *