weird electrical things can happen to the spark .. even if the plug sparks when outside the engine it might not spark when it's inside. But these troubles are rare and an ignition that can spark at all is usually ok.
More likely is a plug is immediately fouling when attempting to start. So, no spark all of a sudden. This would point to a bunch of fuel puddled in the bottom of the crankcase or a leaking carburetor into the engine.. But the plug would come out wet and this kind of fouling can be detected.
Start with the basics like setting the plug gap properly..
and check ignition timing .. if something happened to the flywheel and it got turned around somehow (like a sheared woodruff key) it might not be sparking anywhere near piston-top dead center.