Why does the custard in my lemon/lime bars always come out looking terrible and with bad texture?
It is very difficult to tell what is wrong definitively from your pictures, but the custard appears to be curdled, or have too much air, or both.

When you make the lemon or lime curd, you don't want to mix air into it, which will cause it to puff up, then collapse.

You also don't want to overcook it, as it will curdle like scrambled eggs.  You haven't mentioned whether the curd is made stove top or baked in the oven on top of the crust layer.  From the look, I am guessing they are baked, and were probably over baked.  Lemon curd wants to be cooked to about 170 F (77 C), which is a little lower than a standard custard, due to the high level of acidity making the proteins set at a lower temperature.