Yes, initially their skills are determined by their class and level. But their skills seem to become modified, to sort of mirror the player's ability (at least this is true for Small Guns skills). When my character's SG skills are really low, the NPCs have a really hard time hitting me . . . even up close. And when my character's SG skill improves, the NPCs' SG skill improves . . . and they get much more accurate at being able to hit me.
Sounds very much like the skill progression the spawned raiders use as being part of a leveled character list. If your level is low, a raider 1 is spawned as an enemy, medium and a raider 2 shows up, high and a raider 3 is all you'll see. Their SG skills are 34 for raider1-level1, 47 for raider2-level4, and 68 for raider3-level9. The accuracy differences you might have seen, with both PC's being of the same level, may be due to the weapon type the raider was using (raiderGUN vs. raiderRIFLE for a spawned enemy, rifle is always a better shot even though they both have the same SG skill).
If you're seeing the skill mirroring on unique, non-spawn list enemies or NPC's, it's almost surely a function of them having the 'PC Level Mult' flag checked on their geck stats page, along with "Auto-Calc Stats'. 'Auto-calc stats' adjusts the NPCs skills based on their current level. If that level's a fixed number then their skills won't ever increase. If "PC Level Mult" is on and has a valid mirror percentage in there, their level will echo the PCs level by that percentage. If both 'PC Level Mult' and "Auto-Calc Stats" are enabled, the NPC's level AND skills will rise as the players skills rise (the NPCs skill numbers become an offset percentage value instead of hard value). A few of the unique or special raiders do have PC Level Mirroring turned on.
EDIT: As for a way of changing the fact that low level raiders are basically really bad shots? I'd say you can change the TEMPLATE raider SG skills individually in the geck, that would raise all raiders spawned from that template npc to that level. In game I don't know of any way to do that to a whole group. You'd have to use the console on each npc individually as there's no way to get a referrence to the template npc (they aren't in the game).