I would check to see if your PSU has sufficient power to run the RX580 with two monitors.
AMD Recommends a minimum PSU of 500 watts while another PSU-GPU website recommends a 550 Watt PSU as minimum.
Do you have all the RX 580 Power cables connected?
See if it is a driver issue by first installing the latest and then a previous AMD driver.
Latest RX580 AMD Driver: https://www.amd.com/en/support/graphics/radeon-500-series/radeon-rx-500-series/radeon-rx-580
Previous AMD Drivers: https://www.amd.com/en/support/previous-drivers/graphics/radeon-500-series/radeon-rx-500-series/rade...
NOTE: How are both Monitors connected to the GPU card and are you using an Adapter with cables with any of the two Monitors.
Also check Windows Event Viewer to see if you see any Errors concerning the AMD Driver.
EDIT: could also be a defective cable/Adapter or even Monitor. a shorted Monitor cable as an example.