Converting LED String Lights from Battery to DC Power Supply
There are a number of things that could contribute to this. 

First off re-connect the lights to the batteries and measure the voltage across the wires where the battery connections are. Two CR2032 batteries should show a nomimal voltage of 6V or thereabouts. It is possible that the voltage of your switching module is too low to activate the LEDs string properly.

The next step would be to consider just how much current the LED strings will take. Sometimes when cheap LED strings are used with small batteries they are not equipped with a series resistor to limit the total current and instead leverage the internal resistance of the coin cell batteries to limit the current. Your 5V adapter very likely has a much lower internal source resistance than the battery and so the current allowed to flow in the LED string is much greater. Greater to the extent that it exceeds the current limit rating of your AC to DC adapter. When an adapter (if it is a safe and decent design) goes into current limit it will typically shut down it's output section and the output voltage will fall. Eventually the voltage will get too low that the LED string cannot even light. This makes the current fall to a very low level and thus the adapter is able to recover. This process repeats in a cycle and causes the flashing. To fix this you would have to add a series resistor to limit the current to the LED string. 

It may be necessary to measure the total current consumed by the LED string when connected to the battery in order to determine the size (ohms) of resistor to use.