Pain under the ball of the big toe is easy to blame on shoes or a long day. Two named causes are worth checking before you settle on that story.
The short answer
Two sources name two different causes. The Hospital for Special Surgery says bunions are bony bumps that form on the joint at the base of your big toe, and they sometimes cause pain in the ball of the foot because of the big toe's poor alignment, as increased force is transferred under the adjacent bones.
Cleveland Clinic lists the other one, sesamoiditis. Its symptoms include foot pain in the ball of your foot under your big toe, difficulty bending your big toe, difficulty putting weight on the ball of your foot, and local swelling and tenderness to touch.
How to tell which one you are dealing with
Look at the big toe joint first. A visible bump at its base fits the bunion description, while pain directly under the toe with tenderness to the touch fits the sesamoiditis description.
Cleveland Clinic also says sesamoiditis usually develops slowly. A pain that crept up over weeks is a reason to have it examined, not a reason to wait it out indefinitely.
Notes that separate a bunion from sesamoiditis
Stop guessing between the two. Note where it hurts, whether bending the toe makes it worse, and whether weight on the ball of the foot does too. Take those notes to a foot and ankle clinician.
For reading while you wait, see Cleveland Clinic's page on sesamoiditis, the MedlinePlus encyclopedia entry on foot pain, and the HSS overview of bunions.
A calm last word
Forefoot pain has more than one possible source, and the right fix depends on which one it is. A short, specific note about where it hurts will get you further than a long guess.