Do you reduce the CR of monsters with resistance to Fire or Lightning when facing a party with no Fire- or Lightning-based attacks, since the resistance doesn't affect that party?
I'm going to guess that, no, you don't, even though it doesn't affect play. Non-magical weapon resistance is no different. Some parties will be affected by the resistance. Other parties will not. But the monster remains the same, and should have the same CR, either way.
Madness lies down the path of adjusting CR to discount abilities which don't affect the PC party: "We need to have one spell of every element, so that all elemental resistances will contribute to CR. We also need one person with a non-magical weapon, so that non-magical weapon resistance will contribute. Etc."
For the purposes of the resistance/immunity example in the original question:
"bludgeoning, piercing, and slashing from nonmagical weapons that aren't silvered"
The "weapons" portion of the example is actually sufficient to know that it does not apply against the example sources of damage, magical or not. The resistance only applies to specific damage type subcategories of weapon damage. None of the given examples are weapon attacks, so this resistance/immunity to damage from weapons does not apply to the given non-weapon examples in the question regardless of what type of damage is being done.
That said, errata has updated most (all?) instances of the given resistance/immunity example in the question to the following:
Bludgeoning, Piercing, and Slashing from Nonmagical Attacks that aren't Silvered
(Weapons -> Attacks)
Now it's clearer that the magical status of the attack itself should be considered.
The Sage Advice compendium provides the following checklist for determining if something is considered magical (see also: How do I know if an ability is magical?)
If you cast
antimagic field, don armor of invulnerability, or use another
feature of the game that protects against magical or nonmagical
effects, you might ask yourself, “Will this protect
me against a dragon’s breath?”
[...]
Determining whether a game feature is
magical is straightforward. Ask yourself these questions
about the feature:
- Is it a magic item?
- Is it a spell? Or does it let you create the effects of a spell
that’s mentioned in its description?
- Is it a spell attack?
- Is it fueled by the use of spell slots?
- Does its description say it’s magical?
Since the question's examples are all spells or spell attacks, they fall cleanly under the umbrella of being magical. As such, thorn whip and the initial spell attack of ice knife are considered magical attacks, which clearly bypasses the errataed resistance/immunity text. Damage dealt as an effect of spell that isn't related to a spell attack roll (like the damage of earth tremor) is both magical and not from an attack, so the resistance/immunity text also doesn't apply there.
It's also worth noting that there's currently no such thing as an attack that is both a spell attack and a weapon attack, as noted in answers to a question about how to refer to non-spell attacks.
Best Answer
It is resistant to all piercing
As you've noted in the flameskull, they are resistant to:
Because there is no qualifier for only piercing from a non-magical source, it is resistant to any piercing damage.
Better bludgeon or slash it. Just don't use cold, fire, or poison - it's completely immune to those.