Are you holding the Joy-Con correctly? There are several different ways you can hold a Joy-Con controller.
You can check how one or both Joy-Con controllers are currently being used by opening Controllers on the HOME Menu.
Select "Change Grip/Order" if you would like to change how you are holding the controller(s). How you hold the Joy-Con controllers depends on the game you are playing. Please follow the in-game instructions.
Are you too far from the Nintendo Switch console? See if getting closer to the console solves the problem.
Is the controller out of battery? Try charging the controller.
Are you trying to use the Joy-Con controllers attached to the console when it is in TV mode? You must detach the Joy-Con controllers from the console if you would like to use them while the console is in TV mode.
The console might be receiving input from another controller. Start System Settings from the HOME Menu, then select Controllers and Sensors ⇒ Disconnect Controllers to disconnect all controllers and delete controller pairings. You will then need to pair the controller that you'd like to use to the console. The Joy-Con controllers will pair automatically when they are attached to the console. When the console is in TV mode, you can pair a Nintendo Switch Pro Controller by connecting it to the Nintendo Switch dock using the USB charging cable.
A problem may have occurred with the control sticks. Start System Settings from the HOME Menu, then select Controllers and Sensors ⇒ Calibrate Control Sticks to see if this fixes the problem.
A problem may have occurred with the gyroscope. Start System Settings from the HOME Menu, then select Controllers and Sensors ⇒ Calibrate Motion Controls to see if this fixes the problem.
Check that the controller buttons are working. Start System Settings from the HOME Menu, then select Controllers and Sensors ⇒ Test Input Devices ⇒ Test Controller Buttons to make sure that the buttons are functioning correctly. If any buttons are not working properly, please contact Nintendo Customer Service.
Is it possible that radio wave interference could be disrupting the console? Problems with the console may be caused by nearby devices that can disrupt radio waves, such as audio visual equipment, microwaves, cordless devices, and metal TV stands or racks. Try moving the console to a different location and see if that fixes the problem.