Real time or turn based? I'm assuming turn-based based on previous posts. If you want to spread it out into to-hit and damage calculations as separate:
Factors you can use for 'to-hit':
Target Ship movement / Target Ship's 'piloting/evasion/dodging' skill / Target Ship's defensive equipment (Displacer fields, ECM, cloaking, etc) / Target Ship size
Atttacker Ship movement / Attacker 'gunnery' skill / Attacker offensive equipment (Targeting computer, ECCM, Precognition device)
Weapon type or weapon accuracy / weapon mount (fast turret, slow turret)
Range
Cover? -- in space? Not sure what your battlefields are going to look like, maybe asteroids should make it hard to hit, does an intervening ship count?
Anyway, I'd probably start it at some base chance to hit, maybe even 100% chance to hit normally, then adjust for all the factors, either in one giant multiplication, or perhaps spread it out, either:
baseChance * attackerSkill * factorX * factorY * factorZ etc...
or maybe
baseChance + baseAttackerModification * (all attacker modifications) + baseDefenderModifications * (all defender modifications)
For the latter equation, you could go with a 50% base chance, and the base attacker / defender mods could be 25% each (or you could go with numbers that don't add up to 100%, if you're fine with 125% chances to hit under some circumstances)
Damage
One alternative is to go with somewhat simulation based damage system. For your laser example, you could give each laser a penetration value,and each ship an armor value and an internal structure value. Say your laser penetrates 155mm of armor, and hits a ship with 100mm of armor, you could then say it penetrated by 55mm of armor, and the internal structure value of the ship is 0.001, so for every mm of armor, the laser travels an additional meter through the internal structure of the ship. From there you can either figure out the components that were hit, or you can calculate the area of the parallelogram / square generated by the laser, and turn that into hit points, etc. Note that for this example and lasers, overpenetration doesn't matter. (Which I think is fine for lasers)
The nice part about that, is say you have an armor piercing explosive shell or a missile, you could have it set to explode only after its penetration is reduced to 0. The explosion could then generate several rays with their own much smaller penetration values. If it explodes after passing all the way through, or before reaching internals, the explosion won't do much, however if it explodes while inside the ship, the rays should travel much farther and hit more components.
You may want to move the 'internal structure value' to the weapon itself, in case you want a weapon that's really good at punching through armor, but won't do huge internal damage. (or average between the weapon and the ship)
EDIT: An alternative to percentages to hit is to go the semi-sim route and just give accuracy cones to all weapons. The nice part about that is that any cover or friendly fire issues are handled within the system. The downside is that fighters might get screwed by this system.