The Pathfinder Player Companion Black Markets provides rules for intentionally crafting cursed items. First, the crafter needs the ability to cast Bestow Curse or Major Curse as a crafting prerequisite, which could increase the DC by +5 if they don't have that spell. Otherwise the crafting DC is the same.
Second, the total cost is reduced by some amount, depending on the item's curse.
Intentionally Crafting Cursed Items
Intentionally crafting cursed items requires the same item creation feats and skill checks as does crafting a normal item of that type, but in addition to such requirements, intentionally cursed items require bestow curse or major curse as a spell prerequisites. Crafting cursed items is generally cheaper than creating fully functional items, depending on the type of curse involved, as detailed below. The table above indicates the price and spell prerequisites of some of the most common deliberately created cursed items.
Delusion: Cost is reduced by 90%.
Drawbacks and Requirements: Cost isn’t reduced for cosmetic drawbacks or requirements with no direct game effects. Cost may be reduced by 10% for minor drawbacks or requirements such as minimum skill ranks or worship of a specific deity; by 30% for harmful or costly drawbacks or requirements such as alignment change, ability damage, sacrificing wealth, or performing a quest to activate the item; or by 50% for severe drawbacks or requirements such as negative levels or sacrificing sentient creatures.
Intermittent Functioning: The cost of uncontrolled or unreliable items is reduced by 10%. The cost of dependent items, which function only in certain situations, is reduced by 30%.
Opposite Effect or Target: Cost is reduced by 50%.
Side note: The quoted text refers to the "above table", because that's how it's printed in the book, but the d20PFSRD page displays the table below the text instead.
Weapons with penalties exist, although the rules are ambiguous about whether you can craft them intentionally. For example, the "-2 Cursed Sword" from Ultimate Equipment imposes -2 to attacks and damage rolls, and forces the owner to use it. The book says they are created accidentally, by failing to craft a +2 longsword. But a permissive GM may let you apply the "Opposite Effect or Target" drawback from Black Markets, and let you intentionally craft a -2 Cursed Sword at half the price of a +2 longsword.