No, it's not bad to plug in your iPhone 4 or iPod Touch in for a short time because they use a lithium-ion battery, which use a trickle charge with a sensor to monitor the battery and keep it charged at its peak. Once the battery charge hits 100%, it will stop charging.
They other good thing to note is that when an iPhone (or iPod) is plugged in it will use direct power and not the battery.
- Lithium batteries do need to be used to maintain their best health. So best usage is frequent and light use (with few full dischages).
- Charge the battery often. The battery lasts longer with partial rather than full discharges.
- Avoid full discharge because it wears down the battery. 80% depth-of-discharge recommended.
So, it's typically beter to keep iPhone 4's and iPod Touch's plugged and charging most of the time.