First of all, the dimmer will only work when the headlights are on, which is normally just at night or indoors, so that's why it seems fine at that time. The dimmer will not do anything with the dash lights during the day or when the headlights are off. You should notice that the dash lights (instrument panel and gauges) are much brighter during the daytime/headlights off.
If they are not coming on, or coming on irregularly and at different brightnesses, you could have a couple different issues going on. First, every lighting circuit goes through the Body Control Module, so that's a good starting place. There have been some known issues with the wiring to and from the BCM and the connectors themselves. More than likely it is not a dimmer switch.
Secondly, if you've got any type of aftermarket device wired into the car (alarm, remote start, radio, other lights, etc) that can be drawing down the entire circuit. If you have anything like that, you should try to remove it and see if your problem is fixed.
The absolute best way to help find an issue like this, or diagnose the BCM as the issue, is to use a scanner to watch all the lighting circuits, inputs and outputs through the BCM to pinpoint the problem area. I'm assuming you probably don't have a suitable scanner to do this, so if you can't find the issue, you may need to take it to a dealership. If you do in fact end up need a BCM, you'll have to visit the dealership anyway to have to programmed and set up.
GM Dealer Technician For 18+ Years
In the automotive industry for 20+