It depends on what you are going to do. If you are looking for a short, then you need the battery hooked up to trouble shoot it. If you are changing a relay or fuse, then the answer is also no. If you are planning to splice into the wiring, it depends on your skill level. In short, there is no correct answer, without knowing exactly what you have in mind. I often work on my cars with the battery connected, but I am experienced, and know what I am doing. If you don't know what you are doing, you can do a lot of damage quickly, that is going to cost a lot to repair. I suggest that you give more detail, and then we can properly advise you. When in doubt, then disconnect the battery, unless it is a modern car, where the battery keeps a lot of information in memory, that is lost when the battery is disconnected.