You touch a nonmagical weapon. Until the spell ends, that weapon becomes a magic weapon with a +1 bonus to attack rolls and damage rolls. The spell ends early if you cast it again.
Using a Higher-Level Spell Slot. The bonus increases to +2 with a level 3–5 spell slot. The bonus increases to +3 with a level 6+ spell slot.
SRD 5.2.1, page 146
World Seed notes: Magic Weapon among level 2 spells
Among the 57 level 2 spells in SRD 5.2.1
Share
Magic Weapon
Need Concentration
51%
No
Can be cast as a Ritual
11%
No
Need a Material component
63%
No
Casting time “Bonus Action”
12%
Yes
School Transmutation
26%
Yes
Class lists
Magic Weapon is on 4 class lists in its description. How many level 2 spells each of those classes has in SRD 5.2.1:
Changes made: SRD 5.2.1 text was extracted from the official PDF and converted into structured data (fields such as size, type, Challenge Rating, XP and spell level were split out; line-break hyphenation was removed; tables were reformatted). Spell description reformatted; level, concentration, ritual, component and class-list comparisons added (computed from SRD data). Original rules text is reproduced as published. Commentary, tactics, encounter suggestions and other material marked “World Seed notes” are original to world.hueseed.com and are not part of the SRD.
World Seed is 5E compatible. More on sources and licences: Licences.