this is a very common problem. two things
either the ballast is bad (not uncommon with aftermarket hids)
or you need to connect the ballasts direct to the battery with a relay. ballasts draw a much larger amperage load when they start up. usually the stock wiring cant handle it.