That looks exactly like my dek-color (well, except for the dirt and high water level). It's intended use is to regulate the flow of chlorinated water into the pool - through the placement of tablets in the dek-color and regulating the water flow into the unit.
How high is the water level of the pool on the weir plate (skimmer door) when looking from the pool toward the skimmer? It should be approximately half way up the opening. Reason I'm asking - the standpipe (round open pipe on left) in the dek-chlor is meant to be above the water level in pool. The inside of that open pipe is connected to the pool and the water level in the standpipe should be at least a tiny bit lower than the water level inside the dek-chlor. So basically the water comes in from the pump through the round plug in the bottom center, filles the vessel, overflows the standpipe - and if chlorine tabs are in the vessel, they dissolve in the water and thus, chlorinated water enters the pool.... That's the basic function of the dek-chlor.
The round plug bottom center has 2 small holes in the side, and it will unscrew. With the pump off, unscrew the plug. Turn the pump back on, make sure that little valve is open and check if water is flowing from the center bottom. If it is, the small holes in the plug are plugged. If so, unplug them, and reinstall the plug - with the pump off. The standpipe (at least in mine) is not glued in.. just press fit. You should be able to wiggle it back and forth to dislodge it.
**** My basic reasons in explaining the function and how to make it possibly work again ****
1 - to get filtered clean water flowing through the dek-chlor (don't want stagnate water)
2 - vacation - a possible way to chlorinate with chlorine tablets when away on vacation
If the water begins flowing through the dek-chlor, you should be able to adjust the flow rate with that valve. If you were to ever use tablets, this would also roughly regulate the amount of chlorine reaching the pool.
YES - please do clean all that gunk out of there.
My pool came with one of these. I used it for the first 14 years after we put the pool in (and replaced water a lot of times). Once I found TFP and started using liquid chlorine/bleach, I only use it with tabs when we go out of town (don't need the added side effects of tablet use - been there, done that).
If that's not the function of the valve, I'm still leaning toward it controlling an aerator - which isn't functioning correctly either.