Hello, I know I can change my light switch/sockets myself as they are like for like. Can I change the halogen transformer on my spotlights myself legally? Thanks in advance!
Yes, provided you safely isolate the circuit at the consumer unit and confirm before and after that the circuit you are working on is dead. Use a multuimeter and not a volt stick or neon screwdriver!
Yes, contrary to popular myth there is no law that prohibits any DIY electrical works, including re-wiring the whole house. You have to comply with the wiring regulations and Part P of the building regulations, however as you are replacing items like for like there should be no issue, certainly with the latter. I would invest in a socket test plug to ensure you have it wired correctly and of course ensure you have isolated the circuit. In lighting circuits we can find "borrowed neutrals" which can lead to nasty surprises, so my best advice would be to do the work in daylight hours and throw the main switch. Another top tip is to take a picture of where all the wires go before taking it apart, often there are multiple wires and its easy to make a mistake - if there are multiple wires the same colour, say behind a switch it can be useful to mark them with a bit of tape or by putting dots on with a sharpie marker so you can remember what went to what.
Why are you keeping the (discontinued) halogen lamps? Surely it would be better to change to LED lamps.