Dont worry too much, Im sure it can be sorted out.
My beardies are extremely fussy and the slightest change can cause them to be put off eating.
Well first things first.
Do not keep the lights on at night.
Dragons prefer TOTAL darkness, and NEED it, so they can get a good sleep. Without a good nap their immune systems dont funtion properly. They dont need either the UV or the red lamp on all the time.
About 12 hours on, 12 hours off.
He may even just be tired from lack of sleep!
Turn them off tonight so he can rest.
Secondly, he sounds like he is an older dragon.
Now, as dragons are cold blooded creatures, they do not need to eat food to keep themselves warm, unlike we do. If we dont eat food we die because we cant maintain our body temps.
Dragons get their heat from the sun, and most of their FOOD is used for GROWTH, not maintaining their body temps.
So TEMPERATURE is really important.
Check the temps under the light, on the basking spot. It should be around 100 degrees F.
Maybe replace the bulb.
If its any reassurance, most adult bearded dragons don't eat every day, sometimes not at all in a week, because they get their energy from the light. And they dont usually eat live food as much, mostly greens, so make sure theres loads of them. Favourites are: Collared greens, mustard greens, squash.
Try putting some chicken baby food (or something similar) (softened and warmed slightly in the microwave) on the end of his nose carefully. He will probably lick it off, and get a taste for it, this may help his appetite.
Avoid spinach, lettuce and cabbage.
Thirdly, dragons get lethargic and motionless if their calcium levels are low. They get their calicum via their food, but the UV light makes their bodies process it.
Make sure he can get about 8 inches away from the UV light.
Make sure it is a ReptiSun 10 flourescent tube, its one of the only safe brands for dragons. And if you haven't replaced the light in about 6 months, then do so straight away, with the ReptiSun 10 flourescent tube.
Dust some of the food in Calcium supplement every day.
Both the UV light and the calcium supplement are easy to find and relatively cheap.
A few more things you could try are running a warm
bath up to his shoulders and soaking him in it for 15 minutes, this will help him absorb water if you are worried about dehydration.
Adult dragons dont usually poo every day either, so dont panic if he doesnt.
They usually live for a good few years, so I dont think old age is an issue if hes only about 3years old
Hope that helps!
ANY questions please PM me, and reply soon, keep us posted.