Yesterday I noticed horizontal upwards moving lines on the LCD screen on the D3100 when I was using live view.
It doesn't happen always, is this normal?
It's completely normal under artificial lighting, when frame rate of your camera matches closely flickering rate of the light source (usually determined by frequency of electrical network). If the electricity frequency is n times higher, there will be n lines on screen.
When the frequency matches exactly, dark/bright phases of light flickering will always fall during time when camera reads the same row of pixels and those rows will seem darker/brighter. Now, if the frequency match is not close, but only approximate, a cycle may fall on a neighbor row compared to the preceding cycle those darker/brighter lines will appear to be moving. This is not a camera defect, just a result of two engineering solutions (in light source and video capture) using frequencies invisible to human eye becoming visible when used together.