Land and Environmental services within your local council will deal with noise complaints. Most councils also have Night Noise teams who can come out of hours and measure the level of noise coming from the neighbour's house.
For long term problems, the Department is likely to ask you to keep a diary of the noise nuisance. During the investigation they may issue you with some equipment to record the noise. These two steps are designed to gather evidence for a prosecution (although it is likely they will give your neighbour the opportunity to turn the TV/music down without further action.
The police also have powers to prosecute for noise nuisance in terms of Civic Government Scotland Act 1982 section 54 for persisting, to the annoyance of others, in playing musical instruments, singing, playing radios etc. on being required to stop.
Please see the links in Related Information for further details.