I have a lv3 Dragonborn Fighter, and I am still completing the sheet. I need to know the attack bonus for the Javelin of Lightning in order to use it. I usually just stick to what the DM says.
Your attack roll is 1d20 + Strength modifier + Proficiency Bonus
The Javelin of Lightning states (possibly spoilers, unsure how much your GM has told you and wants you to know):
This javelin is a magic weapon. When you hurl it and speak its command word, it transforms into a bolt of lightning, forming a line 5 feet wide that extends out from you to a target within 120 feet. Each creature in the line excluding you and the target must make a DC 13 Dexterity saving throw, taking 4d6 lightning damage on a failed save, and half as much damage on a successful one. The lightning bolt turns back into a javelin when it reaches the target. Make a ranged weapon attack against the target. On a hit, the target takes damage from the javelin plus 4d6 lightning damage. The javelin's property can't be used again until the next dawn. In the meantime, the javelin can still be used as a magic weapon. Proficiency with a javelin allows you to add your proficiency bonus to the attack roll for any attack you make with it.
If you are causing creatures to make the saving throws, then there is no attack roll against them, but the person you actually target with the attack will require an attack roll to be made.
You add your Strength modifier because it is a melee weapon attack:
The ability modifier used for a melee weapon attack is Strength, and the ability modifier used for a ranged weapon attack is Dexterity.
You add your proficiency bonus because the weapon later states that you count as proficient if you are proficient in javelins, and as a Fighter, you are proficient in javelins.
Thus you would be adding your proficiency bonus (since you're proficient) and you're Strength modifier (since you're making an attack with a melee weapon). This happens to be the same as a usual javelin.
For further help there is this quite comprehensive answer by Xirema to the question "How do I figure the dice and bonuses for attack rolls and damage rolls?.