I have heard people state that if your micro controller is not reading the signal properly, then we need to use a pull-up resistor. Which I don't get? It makes sense when switch is involved because you don't want a floating signal. What I don't understand is why do my friends mentions the pull up resistor help in better voltage reading??
It would help if you give more specifics as to where have you "heard" that and in which type of circuit. I can only say that while with a switch you have a floating input, with other components you have a leakage current which pulls the node up or down, so a pull-up or pull-down resistor serves to counter the effects of that leakage current. In short, we don't use pull-up or pull-down resistors only with switches because of their floating state, but also with other components (including, but not limited to, electrolytic capacitors and transistors) because of their leakage currents.
Sometimes it does not matter if you use a pull-up or pull-down resistor to keep default state of the data pin, and the pushbutton will overwrite that with another potential. Inside a plastic case you can have buttons wired with pull-downs and the buttons connect to common +5V wire. Some MCUs have internal pull-downs so you can omit external resiators.
However, it is far more common to find MCUs that only have internal pull-ups. And, if you want the buttons to be in a metal box, you most likely have the metal case grounded, and so it will be safer and easier to have buttons pulled up and switching to ground, to avoid short circuits of 5V to grounded metal case. Some chips, devices and buses can only pull to ground or let the wire float, as they have open-drain or open-collector outputs, so they need pull-ups for sure.
Do we only use pull-up resistor or pull-down resistors when dealing with switches?
Yes, but the switch can be an electronic one. We use them wherever the input can only pull one way.
Figure 1. Various configurations requiring pull-up resistors.
Each of the examples above can only pull the input low. As a result a pull-up is required.